From 40f36bf67035f3a10e46ce2e207853e10a707112 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 14 Apr 2023 19:20:12 -0700 Subject: [PATCH] Upgraded to RIFE2 1.5.20 --- .idea/libraries/bld.xml | 4 +-- .vscode/settings.json | 2 +- README.md | 7 ++-- lib/bld/bld-wrapper.jar | Bin 25100 -> 25100 bytes lib/bld/bld-wrapper.properties | 2 +- .../rife/bld/extension/PmdOperationBuild.java | 2 +- .../java/rife/bld/extension/PmdOperation.java | 31 +++++------------- 7 files changed, 18 insertions(+), 30 deletions(-) diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index 7aa10eb..3409629 100644 --- a/.idea/libraries/bld.xml +++ b/.idea/libraries/bld.xml @@ -2,11 +2,11 @@ - + - + diff --git a/.vscode/settings.json b/.vscode/settings.json index ba59365..122fc60 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,7 +7,7 @@ ], "java.configuration.updateBuildConfiguration": "automatic", "java.project.referencedLibraries": [ - "${HOME}/.rife2/dist/rife2-1.5.19.jar", + "${HOME}/.rife2/dist/rife2-1.5.20.jar", "lib/compile/*.jar", "lib/runtime/*.jar", "lib/test/*.jar" diff --git a/README.md b/README.md index d4ef9b9..9e985d2 100755 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ To check all source code using the [java quickstart rule](https://pmd.github.io/ ```java @BuildCommand public void pmd() throws Exception { - new PmdOperation(this).execute(); + new PmdOperation + .fromProject(this) + .execute(); } ``` ```text @@ -22,7 +24,8 @@ To check the main source code using a custom rule, [java error prone rule](https ```java @BuildCommand public void pmdMain() throws Exception { - new PmdOperation(this) + new PmdOperation + .fromProject(this) .failOnValidation(true) .addInputPath(project.srcMainDirectory().toPath()) .addRuletSet("config/pmd.xml", "category/java/errorprone.xml"); diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar index 48e3283f4feb7878fea0d04b5f1806b749e5d14f..2c3f5a5e169a6ebc52e6e927225894998794a6eb 100644 GIT binary patch delta 151 zcmeAJzuf%P{z!2cg&XM(amfhqF@gg7vlb^>sgK6CaPcU7X5CWzzB)EcUiNrXF Pc%nZCP<sgK6CaPcU7X5CWzzB)EcUiNrXF Pc%nZCP< { /** * The project reference. */ - private Project project; + private BaseProject project; /** - * Creates a new operation. - *

- * The defaults are: - *

    - *
  • encoding={@code UTF-9}
  • - *
  • incrementAnalysis={@code true}
  • - *
  • reportFormat={@code text}
  • - *
  • rulePriority={@code LOW}
  • - *
  • suppressedMarker={@code NOPMD}
  • - *
- */ - public PmdOperation() { - super(); - } - - /** - * Creates a new operation. + * Configures a PMD operation from a {@link BaseProject}. + * *

* The defaults are: *

    @@ -156,13 +141,13 @@ public class PmdOperation extends AbstractOperation { *
  • suppressedMarker={@code NOPMD}
  • *
*/ - public PmdOperation(Project project) { - super(); + public PmdOperation fromProject(BaseProject project) { this.project = project; inputPaths.add(project.srcMainDirectory().toPath()); inputPaths.add(project.srcTestDirectory().toPath()); ruleSets.add(RULE_SET_DEFAULT); + return this; } /** @@ -225,7 +210,7 @@ public class PmdOperation extends AbstractOperation { } /** - * 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) { this.languageVersions.addAll(List.of(languageVersion)); @@ -471,7 +456,7 @@ public class PmdOperation extends AbstractOperation { } /** - * 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) { this.inputUri = inputUri;