diff --git a/README.md b/README.md index f8f17e3..4b7e28d 100644 --- a/README.md +++ b/README.md @@ -37,5 +37,5 @@ not provided by the extension. For example: ```java repositories = List.of(MAVEN_CENTRAL); -scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 16, 0))); +scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 17, 0))); ``` diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index 86b920c..d36e73a 100644 --- a/examples/lib/bld/bld-wrapper.properties +++ b/examples/lib/bld/bld-wrapper.properties @@ -1,6 +1,6 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true -bld.extensions=com.uwyn.rife2:bld-checkstyle:1.0.0 +bld.extensions=com.uwyn.rife2:bld-checkstyle:1.0.1 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.downloadLocation= bld.sourceDirectories= diff --git a/examples/src/bld/java/com/example/ExamplesBuild.java b/examples/src/bld/java/com/example/ExamplesBuild.java index 52a2409..f271cb5 100644 --- a/examples/src/bld/java/com/example/ExamplesBuild.java +++ b/examples/src/bld/java/com/example/ExamplesBuild.java @@ -23,7 +23,7 @@ public class ExamplesBuild extends BaseProject { repositories = List.of(MAVEN_CENTRAL); - scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 16, 0))); + scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 17, 0))); testOperation().mainClass("com.example.ExamplesTest"); } diff --git a/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java b/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java index 022322b..b2f7fd9 100644 --- a/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java +++ b/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java @@ -35,7 +35,7 @@ public class CheckstyleOperationBuild extends Project { public CheckstyleOperationBuild() { pkg = "rife.bld.extension"; name = "CheckstyleOperation"; - version = version(1, 0, 1, "SNAPSHOT"); + version = version(1, 0, 1); javaRelease = 17; downloadSources = true; @@ -45,10 +45,10 @@ public class CheckstyleOperationBuild extends Project { scope(compile) .include(dependency("com.uwyn.rife2", "bld", version(1, 9, 1))); scope(test) - .include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 16, 0))) + .include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 17, 0))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2))) - .include(dependency("org.assertj", "assertj-core", version(3, 25, 3))); + .include(dependency("org.assertj", "assertj-core", version(3, 26, 0))); javadocOperation() .javadocOptions() .author() diff --git a/src/test/java/rife/bld/extension/CheckstyleOperationTest.java b/src/test/java/rife/bld/extension/CheckstyleOperationTest.java index 17bda8e..f844153 100644 --- a/src/test/java/rife/bld/extension/CheckstyleOperationTest.java +++ b/src/test/java/rife/bld/extension/CheckstyleOperationTest.java @@ -42,6 +42,59 @@ class CheckstyleOperationTest { assertThat(op.options.get("-b")).isEqualTo(FOO); } + @Test + void checkAllParameters() { + var params = List.of( + "-b", + "-c", + "-d", + "-e", + "-E", + "-f", + "-g", + "-j", + "-J", + "-o", + "-p", + "-s", + "-t", + "-T", + "-w", + "-x" + ); + + var args = new CheckstyleOperation() + .fromProject(new Project()) + .branchMatchingXpath("xpath") + .configurationFile("config") + .debug(true) + .exclude("path") + .excludeRegex("regex") + .executeIgnoredModules(true) + .format(CheckstyleFormatOption.XML) + .generateXpathSuppression(true) + .javadocTree(true) + .outputPath("optionPath") + .propertiesFile("properties") + .suppressionLineColumnNumber("12") + .tabWith(1) + .tree(true) + .treeWithComments(true) + .treeWithJavadoc(true) + .executeConstructProcessCommandList(); + + for (var p : params) { + var found = false; + for (var a : args) { + if (a.startsWith(p)) { + found = true; + break; + } + } + assertThat(found).as(p + " not found.").isTrue(); + } + } + @Test void configurationFile() { var op = new CheckstyleOperation().fromProject(new Project()).configurationFile(FOO);