Compare commits
3 commits
e5738ec79d
...
1141c3bbb8
Author | SHA1 | Date | |
---|---|---|---|
1141c3bbb8 | |||
cdd9fd345a | |||
a1fccaabc3 |
5 changed files with 59 additions and 6 deletions
|
@ -37,5 +37,5 @@ not provided by the extension. For example:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
repositories = List.of(MAVEN_CENTRAL);
|
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)));
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
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.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class ExamplesBuild extends BaseProject {
|
||||||
|
|
||||||
repositories = List.of(MAVEN_CENTRAL);
|
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");
|
testOperation().mainClass("com.example.ExamplesTest");
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class CheckstyleOperationBuild extends Project {
|
||||||
public CheckstyleOperationBuild() {
|
public CheckstyleOperationBuild() {
|
||||||
pkg = "rife.bld.extension";
|
pkg = "rife.bld.extension";
|
||||||
name = "CheckstyleOperation";
|
name = "CheckstyleOperation";
|
||||||
version = version(1, 0, 1, "SNAPSHOT");
|
version = version(1, 0, 1);
|
||||||
|
|
||||||
javaRelease = 17;
|
javaRelease = 17;
|
||||||
downloadSources = true;
|
downloadSources = true;
|
||||||
|
@ -45,10 +45,10 @@ public class CheckstyleOperationBuild extends Project {
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("com.uwyn.rife2", "bld", version(1, 9, 1)));
|
.include(dependency("com.uwyn.rife2", "bld", version(1, 9, 1)));
|
||||||
scope(test)
|
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.jupiter", "junit-jupiter", version(5, 10, 2)))
|
||||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 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()
|
javadocOperation()
|
||||||
.javadocOptions()
|
.javadocOptions()
|
||||||
.author()
|
.author()
|
||||||
|
|
|
@ -42,6 +42,59 @@ class CheckstyleOperationTest {
|
||||||
assertThat(op.options.get("-b")).isEqualTo(FOO);
|
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
|
@Test
|
||||||
void configurationFile() {
|
void configurationFile() {
|
||||||
var op = new CheckstyleOperation().fromProject(new Project()).configurationFile(FOO);
|
var op = new CheckstyleOperation().fromProject(new Project()).configurationFile(FOO);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue