Bumped CheckStyle to version 10.18.0

This commit is contained in:
Erik C. Thauvin 2024-08-25 11:08:12 -07:00
parent 143bb31a78
commit becd6384cd
Signed by: erik
GPG key ID: 776702A6A2DA330E
6 changed files with 24 additions and 18 deletions

6
.idea/bld.xml generated Normal file
View file

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

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, 17, 0)));
scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 18, 0)));
testOperation().mainClass("com.example.ExamplesTest");
}

View file

@ -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, 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("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("org.assertj", "assertj-core", version(3, 26, 3)));
javadocOperation()
.javadocOptions()

View file

@ -284,13 +284,6 @@ 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
@ -492,4 +485,11 @@ 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,12 +156,6 @@ 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())
@ -191,6 +185,12 @@ 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");