Compare commits
No commits in common. "d28388bcd4d8b543e1eed1ba9aa6503837512bb5" and "143bb31a78c327573172be2b7859b4bdba3285a4" have entirely different histories.
d28388bcd4
...
143bb31a78
7 changed files with 20 additions and 26 deletions
6
.idea/bld.xml
generated
6
.idea/bld.xml
generated
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="BldConfiguration">
|
|
||||||
<events />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
|
@ -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, 18, 0)));
|
scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 17, 0)));
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.downloadLocation=
|
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.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
bld.version=2.0.1
|
bld.version=2.0.1
|
||||||
|
|
|
@ -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, 18, 0)));
|
scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 17, 0)));
|
||||||
|
|
||||||
testOperation().mainClass("com.example.ExamplesTest");
|
testOperation().mainClass("com.example.ExamplesTest");
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,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, 3);
|
version = version(1, 0, 2);
|
||||||
|
|
||||||
javaRelease = 17;
|
javaRelease = 17;
|
||||||
downloadSources = true;
|
downloadSources = true;
|
||||||
|
@ -43,9 +43,9 @@ public class CheckstyleOperationBuild extends Project {
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("com.uwyn.rife2", "bld", version(2, 0, 1)));
|
.include(dependency("com.uwyn.rife2", "bld", version(2, 0, 1)));
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 18, 0)))
|
.include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 17, 0)))
|
||||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0)))
|
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 3)))
|
||||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0)))
|
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 3)))
|
||||||
.include(dependency("org.assertj", "assertj-core", version(3, 26, 3)));
|
.include(dependency("org.assertj", "assertj-core", version(3, 26, 3)));
|
||||||
javadocOperation()
|
javadocOperation()
|
||||||
.javadocOptions()
|
.javadocOptions()
|
||||||
|
|
|
@ -284,6 +284,13 @@ public class CheckstyleOperation extends AbstractProcessOperation<CheckstyleOper
|
||||||
return this;
|
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
|
* 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
|
* content excluding '/**' and '*/' 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;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Determines if a string is not blank.
|
|
||||||
*/
|
|
||||||
private boolean isNotBlank(String s) {
|
|
||||||
return s != null && !s.isBlank();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,6 +156,12 @@ class CheckstyleOperationTest {
|
||||||
assertThat(tmpFile).exists();
|
assertThat(tmpFile).exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void executeNoProject() {
|
||||||
|
var op = new CheckstyleOperation();
|
||||||
|
assertThatCode(op::execute).isInstanceOf(ExitStatusException.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void executeConstructProcessCommandList() {
|
void executeConstructProcessCommandList() {
|
||||||
var op = new CheckstyleOperation().fromProject(new BaseProject())
|
var op = new CheckstyleOperation().fromProject(new BaseProject())
|
||||||
|
@ -185,12 +191,6 @@ class CheckstyleOperationTest {
|
||||||
assertThat(op.options().containsKey("-E")).as(REMOVE).isFalse();
|
assertThat(op.options().containsKey("-E")).as(REMOVE).isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void executeNoProject() {
|
|
||||||
var op = new CheckstyleOperation();
|
|
||||||
assertThatCode(op::execute).isInstanceOf(ExitStatusException.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void executeSunChecks() throws IOException {
|
void executeSunChecks() throws IOException {
|
||||||
var tmpFile = File.createTempFile("checkstyle-sun", ".txt");
|
var tmpFile = File.createTempFile("checkstyle-sun", ".txt");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue