Skip to content

Commit

Permalink
Bumped CheckStyle to version 10.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed Aug 25, 2024
1 parent 143bb31 commit becd638
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 18 deletions.
6 changes: 6 additions & 0 deletions .idea/bld.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
```
2 changes: 1 addition & 1 deletion examples/src/bld/java/com/example/ExamplesBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ExamplesBuild() {

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");
}
Expand Down
6 changes: 3 additions & 3 deletions src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public CheckstyleOperationBuild() {
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()
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/rife/bld/extension/CheckstyleOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,6 @@ public CheckstyleOperation generateXpathSuppression(boolean xPathSuppression) {
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 '/**' and '*/' at the beginning and at the end respectively. It can only be used on a
Expand Down Expand Up @@ -492,4 +485,11 @@ public CheckstyleOperation treeWithJavadoc(boolean isTree) {
}
return this;
}

/*
* Determines if a string is not blank.
*/
private boolean isNotBlank(String s) {
return s != null && !s.isBlank();
}
}
12 changes: 6 additions & 6 deletions src/test/java/rife/bld/extension/CheckstyleOperationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ void execute() throws IOException, ExitStatusException, InterruptedException {
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())
Expand Down Expand Up @@ -191,6 +185,12 @@ void executeIgnoredModules() {
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");
Expand Down

0 comments on commit becd638

Please sign in to comment.