Skip to content

Commit b2a8eb4

Browse files
authored
SONARJAVA-6196 S1451 should provide a default template for headers (#5578)
1 parent caa8c71 commit b2a8eb4

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

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

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

34-
private static final String DEFAULT_HEADER_FORMAT = "";
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+
*/""";
3541
private static final String MESSAGE = "Add or update the header of this file.";
3642

3743
@RuleProperty(

0 commit comments

Comments
 (0)