Skip to content

Commit

Permalink
Add /* header support (#474)
Browse files Browse the repository at this point in the history
Updates the ParameterizedRegexpHeaderCheck so it can also check Java file headers starting with `/*` instead of `/**`.

Signed-off-by: Wouter Born <[email protected]>
  • Loading branch information
wborn authored Jan 6, 2025
1 parent 9dfc156 commit 59cf420
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
public class ParameterizedRegexpHeaderCheck extends AbstractHeaderCheck {
// Default header formats
public static final String DEFAULT_JAVADOC_START_COMMENT = "/**";
public static final String DEFAULT_JAVA_START_COMMENT = "/*";
public static final String DEFAULT_XML_START_COMMENT = "<!--";

private static final String SEPARATOR = "\n";
Expand Down Expand Up @@ -114,7 +114,7 @@ protected void processFiltered(File file, FileText fileText) {
private String getDefaultHeaderFormat(File file) {
switch (FilenameUtils.getExtension(file.getName())) {
case JAVA_EXTENSION:
return DEFAULT_JAVADOC_START_COMMENT;
return DEFAULT_JAVA_START_COMMENT;
case XML_EXTENSION:
return DEFAULT_XML_START_COMMENT;
default:
Expand Down

0 comments on commit 59cf420

Please sign in to comment.