Upgraded to RIFE2 1.5.20
This commit is contained in:
parent
c42d164dd3
commit
40f36bf670
7 changed files with 18 additions and 30 deletions
4
.idea/libraries/bld.xml
generated
4
.idea/libraries/bld.xml
generated
|
@ -2,11 +2,11 @@
|
||||||
<library name="bld">
|
<library name="bld">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.19.jar!/" />
|
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.20.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.19-sources.jar!/" />
|
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.20-sources.jar!/" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<excluded>
|
<excluded>
|
||||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||||
|
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -7,7 +7,7 @@
|
||||||
],
|
],
|
||||||
"java.configuration.updateBuildConfiguration": "automatic",
|
"java.configuration.updateBuildConfiguration": "automatic",
|
||||||
"java.project.referencedLibraries": [
|
"java.project.referencedLibraries": [
|
||||||
"${HOME}/.rife2/dist/rife2-1.5.19.jar",
|
"${HOME}/.rife2/dist/rife2-1.5.20.jar",
|
||||||
"lib/compile/*.jar",
|
"lib/compile/*.jar",
|
||||||
"lib/runtime/*.jar",
|
"lib/runtime/*.jar",
|
||||||
"lib/test/*.jar"
|
"lib/test/*.jar"
|
||||||
|
|
|
@ -10,7 +10,9 @@ To check all source code using the [java quickstart rule](https://pmd.github.io/
|
||||||
```java
|
```java
|
||||||
@BuildCommand
|
@BuildCommand
|
||||||
public void pmd() throws Exception {
|
public void pmd() throws Exception {
|
||||||
new PmdOperation(this).execute();
|
new PmdOperation
|
||||||
|
.fromProject(this)
|
||||||
|
.execute();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
```text
|
```text
|
||||||
|
@ -22,7 +24,8 @@ To check the main source code using a custom rule, [java error prone rule](https
|
||||||
```java
|
```java
|
||||||
@BuildCommand
|
@BuildCommand
|
||||||
public void pmdMain() throws Exception {
|
public void pmdMain() throws Exception {
|
||||||
new PmdOperation(this)
|
new PmdOperation
|
||||||
|
.fromProject(this)
|
||||||
.failOnValidation(true)
|
.failOnValidation(true)
|
||||||
.addInputPath(project.srcMainDirectory().toPath())
|
.addInputPath(project.srcMainDirectory().toPath())
|
||||||
.addRuletSet("config/pmd.xml", "category/java/errorprone.xml");
|
.addRuletSet("config/pmd.xml", "category/java/errorprone.xml");
|
||||||
|
|
Binary file not shown.
|
@ -3,4 +3,4 @@ bld.downloadExtensionSources=true
|
||||||
bld.extensions=
|
bld.extensions=
|
||||||
bld.repositories=MAVEN_CENTRAL,RIFE2
|
bld.repositories=MAVEN_CENTRAL,RIFE2
|
||||||
rife2.downloadLocation=
|
rife2.downloadLocation=
|
||||||
rife2.version=1.5.19
|
rife2.version=1.5.20
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class PmdOperationBuild extends Project {
|
||||||
downloadSources = true;
|
downloadSources = true;
|
||||||
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("com.uwyn.rife2", "rife2", version(1, 5, 19)))
|
.include(dependency("com.uwyn.rife2", "rife2", version(1, 5, 20)))
|
||||||
.include(dependency("net.sourceforge.pmd:pmd-java:6.55.0"));
|
.include(dependency("net.sourceforge.pmd:pmd-java:6.55.0"));
|
||||||
scope(runtime)
|
scope(runtime)
|
||||||
.include(dependency("net.sourceforge.pmd:pmd:6.55.0"));
|
.include(dependency("net.sourceforge.pmd:pmd:6.55.0"));
|
||||||
|
|
|
@ -20,7 +20,7 @@ import net.sourceforge.pmd.PMDConfiguration;
|
||||||
import net.sourceforge.pmd.PmdAnalysis;
|
import net.sourceforge.pmd.PmdAnalysis;
|
||||||
import net.sourceforge.pmd.RulePriority;
|
import net.sourceforge.pmd.RulePriority;
|
||||||
import net.sourceforge.pmd.lang.LanguageVersion;
|
import net.sourceforge.pmd.lang.LanguageVersion;
|
||||||
import rife.bld.Project;
|
import rife.bld.BaseProject;
|
||||||
import rife.bld.operations.AbstractOperation;
|
import rife.bld.operations.AbstractOperation;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
@ -122,26 +122,11 @@ public class PmdOperation extends AbstractOperation<PmdOperation> {
|
||||||
/**
|
/**
|
||||||
* The project reference.
|
* The project reference.
|
||||||
*/
|
*/
|
||||||
private Project project;
|
private BaseProject project;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new operation.
|
* Configures a PMD operation from a {@link BaseProject}.
|
||||||
* <p>
|
*
|
||||||
* The defaults are:
|
|
||||||
* <ul>
|
|
||||||
* <li>encoding={@code UTF-9}</li>
|
|
||||||
* <li>incrementAnalysis={@code true}</li>
|
|
||||||
* <li>reportFormat={@code text}</li>
|
|
||||||
* <li>rulePriority={@code LOW}</li>
|
|
||||||
* <li>suppressedMarker={@code NOPMD}</li>
|
|
||||||
* </ul>
|
|
||||||
*/
|
|
||||||
public PmdOperation() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new operation.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The defaults are:
|
* The defaults are:
|
||||||
* <ul>
|
* <ul>
|
||||||
|
@ -156,13 +141,13 @@ public class PmdOperation extends AbstractOperation<PmdOperation> {
|
||||||
* <li>suppressedMarker={@code NOPMD}</li>
|
* <li>suppressedMarker={@code NOPMD}</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public PmdOperation(Project project) {
|
public PmdOperation fromProject(BaseProject project) {
|
||||||
super();
|
|
||||||
this.project = project;
|
this.project = project;
|
||||||
|
|
||||||
inputPaths.add(project.srcMainDirectory().toPath());
|
inputPaths.add(project.srcMainDirectory().toPath());
|
||||||
inputPaths.add(project.srcTestDirectory().toPath());
|
inputPaths.add(project.srcTestDirectory().toPath());
|
||||||
ruleSets.add(RULE_SET_DEFAULT);
|
ruleSets.add(RULE_SET_DEFAULT);
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -225,7 +210,7 @@ public class PmdOperation extends AbstractOperation<PmdOperation> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the default language to be used for all input files.
|
* Sets the default language to be used for all input files.
|
||||||
*/
|
*/
|
||||||
public PmdOperation defaultLanguage(LanguageVersion... languageVersion) {
|
public PmdOperation defaultLanguage(LanguageVersion... languageVersion) {
|
||||||
this.languageVersions.addAll(List.of(languageVersion));
|
this.languageVersions.addAll(List.of(languageVersion));
|
||||||
|
@ -471,7 +456,7 @@ public class PmdOperation extends AbstractOperation<PmdOperation> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the input URI to process for source code objects.
|
* Sets the input URI to process for source code objects.
|
||||||
*/
|
*/
|
||||||
public PmdOperation uri(URI inputUri) {
|
public PmdOperation uri(URI inputUri) {
|
||||||
this.inputUri = inputUri;
|
this.inputUri = inputUri;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue