Add checkstyle-custom command

This commit is contained in:
Erik C. Thauvin 2025-03-25 12:04:04 -07:00
parent f55e010286
commit e8c901c6c1
Signed by: erik
GPG key ID: 776702A6A2DA330E
2 changed files with 18 additions and 1 deletions

View file

@ -45,7 +45,7 @@ public class ExamplesBuild extends BaseProject {
new ExamplesBuild().start(args);
}
@BuildCommand(summary = "Check code style")
@BuildCommand(summary = "Check code style using Sun coding conventions")
public void checkstyle() throws Exception {
new CheckstyleOperation()
.fromProject(this)
@ -53,4 +53,11 @@ public class ExamplesBuild extends BaseProject {
.execute();
}
@BuildCommand(value = "checkstyle-custom", summary = "Check code style using custom coding conventions")
public void checkstyleCustom() throws Exception {
new CheckstyleOperation()
.fromProject(this)
.configurationFile("src/test/resources/checkstyle.xml")
.execute();
}
}

View file

@ -0,0 +1,10 @@
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="TreeWalker">
<module name="AvoidStarImport">
<property name="severity" value="warning" />
</module>
</module>
</module>