Compare commits

..

No commits in common. "d28388bcd4d8b543e1eed1ba9aa6503837512bb5" and "143bb31a78c327573172be2b7859b4bdba3285a4" have entirely different histories.

7 changed files with 20 additions and 26 deletions

6
.idea/bld.xml generated
View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BldConfiguration">
<events />
</component>
</project>

View file

@ -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, 18, 0)));
scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 17, 0)));
```

View file

@ -1,7 +1,7 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
bld.downloadLocation=
bld.extension-checkstyle=com.uwyn.rife2:bld-checkstyle:1.0.3
bld.extension-checkstyle=com.uwyn.rife2:bld-checkstyle:1.0.2
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories=
bld.version=2.0.1

View file

@ -23,7 +23,7 @@ public class ExamplesBuild extends BaseProject {
repositories = List.of(MAVEN_CENTRAL);
scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 18, 0)));
scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 17, 0)));
testOperation().mainClass("com.example.ExamplesTest");
}

View file

@ -33,7 +33,7 @@ public class CheckstyleOperationBuild extends Project {
public CheckstyleOperationBuild() {
pkg = "rife.bld.extension";
name = "CheckstyleOperation";
version = version(1, 0, 3);
version = version(1, 0, 2);
javaRelease = 17;
downloadSources = true;
@ -43,9 +43,9 @@ public class CheckstyleOperationBuild extends Project {
scope(compile)
.include(dependency("com.uwyn.rife2", "bld", version(2, 0, 1)));
scope(test)
.include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 18, 0)))
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0)))
.include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 17, 0)))
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 3)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 3)))
.include(dependency("org.assertj", "assertj-core", version(3, 26, 3)));
javadocOperation()
.javadocOptions()

View file

@ -284,6 +284,13 @@ public class CheckstyleOperation extends AbstractProcessOperation<CheckstyleOper
return this;
}
/*
* Determines if a string is not blank.
*/
private boolean isNotBlank(String s) {
return s != null && !s.isBlank();
}
/**
* This option is used to print the Parse Tree of the Javadoc comment. The file has to contain only Javadoc comment
* content excluding '&#47;**' and '*&#47;' at the beginning and at the end respectively. It can only be used on a
@ -485,11 +492,4 @@ public class CheckstyleOperation extends AbstractProcessOperation<CheckstyleOper
}
return this;
}
/*
* Determines if a string is not blank.
*/
private boolean isNotBlank(String s) {
return s != null && !s.isBlank();
}
}

View file

@ -156,6 +156,12 @@ class CheckstyleOperationTest {
assertThat(tmpFile).exists();
}
@Test
void executeNoProject() {
var op = new CheckstyleOperation();
assertThatCode(op::execute).isInstanceOf(ExitStatusException.class);
}
@Test
void executeConstructProcessCommandList() {
var op = new CheckstyleOperation().fromProject(new BaseProject())
@ -185,12 +191,6 @@ class CheckstyleOperationTest {
assertThat(op.options().containsKey("-E")).as(REMOVE).isFalse();
}
@Test
void executeNoProject() {
var op = new CheckstyleOperation();
assertThatCode(op::execute).isInstanceOf(ExitStatusException.class);
}
@Test
void executeSunChecks() throws IOException {
var tmpFile = File.createTempFile("checkstyle-sun", ".txt");