Add checkstyle-custom command
This commit is contained in:
parent
f55e010286
commit
e8c901c6c1
2 changed files with 18 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
10
examples/src/test/resources/checkstyle.xml
Normal file
10
examples/src/test/resources/checkstyle.xml
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue