Skip to content

Commit dad07e8

Browse files
authored
SONARJAVA-6269 S1451: Rollback to empty default headerFormat (#5588)
1 parent 5be9ec7 commit dad07e8

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

java-checks/src/main/java/org/sonar/java/checks/FileHeaderCheck.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,7 @@
3131
@Rule(key = "S1451")
3232
public class FileHeaderCheck extends IssuableSubscriptionVisitor {
3333

34-
private static final String DEFAULT_HEADER_FORMAT = """
35-
/*
36-
* <Your-Product-Name>
37-
* Copyright (c) <Year-From>-<Year-To> <Your-Company-Name>
38-
*
39-
* Please configure this header in your SonarCloud/SonarQube quality profile.
40-
*/""";
34+
private static final String DEFAULT_HEADER_FORMAT = "";
4135
private static final String MESSAGE = "Add or update the header of this file.";
4236

4337
@RuleProperty(

java-checks/src/test/java/org/sonar/java/checks/FileHeaderCheckTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,12 @@ void test() {
100100
.verifyNoIssues();
101101

102102
check = new FileHeaderCheck();
103-
check.headerFormat = "";
104103
CheckVerifier.newVerifier()
105104
.onFile(mainCodeSourcesPath("checks/FileHeaderCheck/ClassBlankLine.java"))
106105
.withCheck(check)
107106
.verifyNoIssues();
108107

109108
check = new FileHeaderCheck();
110-
check.headerFormat = "";
111109
CheckVerifier.newVerifier()
112110
.onFile(mainCodeSourcesPath("checks/FileHeaderCheck/ClassNoBlankLine.java"))
113111
.withCheck(check)

0 commit comments

Comments
 (0)