Skip to content

Commit

Permalink
Fix checkstyle error when running specific Maven module
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
nscuro committed Apr 29, 2024
1 parent 59705ba commit fe646eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<property name="localeLanguage" value="en"/>
<module name="Header">
<property name="charset" value="UTF-8"/>
<property name="headerFile" value=".checkstyle-header"/>
<property name="headerFile" value="${parentBaseDir}/.checkstyle-header"/>
</module>
<module name="TreeWalker">
<module name="AvoidStarImport"/>
Expand Down
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeResources>false</includeResources>
<includeTestResources>false</includeTestResources>
<propertyExpansion>
parentBaseDir=${project.parentBaseDir}
</propertyExpansion>
</configuration>
<executions>
<execution>
Expand Down

0 comments on commit fe646eb

Please sign in to comment.