Skip to content

Commit fe646eb

Browse files
committed
Fix checkstyle error when running specific Maven module
Fixes: ``` Failed during checkstyle configuration: cannot initialize module Header - illegal value '.checkstyle-header' for property 'headerFile': com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to find: .checkstyle-header ``` When running a specific module (e.g. `vulnerability-analyzer`) via `mvn quarkus:dev`. Signed-off-by: nscuro <[email protected]>
1 parent 59705ba commit fe646eb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.checkstyle.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<property name="localeLanguage" value="en"/>
77
<module name="Header">
88
<property name="charset" value="UTF-8"/>
9-
<property name="headerFile" value=".checkstyle-header"/>
9+
<property name="headerFile" value="${parentBaseDir}/.checkstyle-header"/>
1010
</module>
1111
<module name="TreeWalker">
1212
<module name="AvoidStarImport"/>

pom.xml

+3
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,9 @@
507507
<includeTestSourceDirectory>true</includeTestSourceDirectory>
508508
<includeResources>false</includeResources>
509509
<includeTestResources>false</includeTestResources>
510+
<propertyExpansion>
511+
parentBaseDir=${project.parentBaseDir}
512+
</propertyExpansion>
510513
</configuration>
511514
<executions>
512515
<execution>

0 commit comments

Comments
 (0)