Skip to content

Commit 59cf420

Browse files
authored
Add /* header support (#474)
Updates the ParameterizedRegexpHeaderCheck so it can also check Java file headers starting with `/*` instead of `/**`. Signed-off-by: Wouter Born <[email protected]>
1 parent 9dfc156 commit 59cf420

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom-checks/checkstyle/src/main/java/org/openhab/tools/analysis/checkstyle/ParameterizedRegexpHeaderCheck.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*/
3737
public class ParameterizedRegexpHeaderCheck extends AbstractHeaderCheck {
3838
// Default header formats
39-
public static final String DEFAULT_JAVADOC_START_COMMENT = "/**";
39+
public static final String DEFAULT_JAVA_START_COMMENT = "/*";
4040
public static final String DEFAULT_XML_START_COMMENT = "<!--";
4141

4242
private static final String SEPARATOR = "\n";
@@ -114,7 +114,7 @@ protected void processFiltered(File file, FileText fileText) {
114114
private String getDefaultHeaderFormat(File file) {
115115
switch (FilenameUtils.getExtension(file.getName())) {
116116
case JAVA_EXTENSION:
117-
return DEFAULT_JAVADOC_START_COMMENT;
117+
return DEFAULT_JAVA_START_COMMENT;
118118
case XML_EXTENSION:
119119
return DEFAULT_XML_START_COMMENT;
120120
default:

0 commit comments

Comments
 (0)