Skip to content

Commit

Permalink
CHANGE (PMD): @W-15819284@: Upgrade PMD to 7.1.0 (#1476)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-carter-at-sf authored May 22, 2024
1 parent 591e590 commit 5d8aba6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions pmd-cataloger/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tasks.register<Delete>("deletePmdCatalogerDist") {

// ======== DEFINE/UPDATE PMD7 DIST RELATED TASKS =====================================================================
val pmd7DistDir = "$distDir/pmd7"
val pmd7Version = "7.0.0"
val pmd7Version = "7.1.0"
val pmd7File = "pmd-dist-$pmd7Version-bin.zip"

tasks.register<de.undercouch.gradle.tasks.download.Download>("downloadPmd7") {
Expand All @@ -76,22 +76,22 @@ tasks.register<Copy>("installPmd7") {
dependsOn("downloadPmd7")
from(zipTree("$buildDir/$pmd7File"))

// I went to https://github.com/pmd/pmd/tree/pmd_releases/7.0.0 and for each of the languages that we support
// I went to https://github.com/pmd/pmd/tree/pmd_releases/7.1.0 and for each of the languages that we support
// (apex, java, visualforce, xml), I took a look at its direct and indirect dependencies at
// https://central.sonatype.com/artifact/net.sourceforge.pmd/pmd-apex/dependencies
// by selecting the 7.0.0 dropdown and clicking on "Dependencies" and selecting "All Dependencies".
// by selecting the 7.1.0 dropdown and clicking on "Dependencies" and selecting "All Dependencies".
// For completeness, I listed the modules and all their compile time dependencies (direct and indirect).
// Duplicates don't matter since we use setOf.
val pmd7ModulesToInclude = setOf(
// LANGUAGE MODULE DEPENDENCIES (direct and indirect)
"pmd-apex", "Saxon-HE", "annotations", "antlr4-runtime", "apex-parser", "apexlink", "asm", "checker-compat-qual", "checker-qual", "checker-qual", "commons-lang3", "error_prone_annotations", "failureaccess", "flogger", "flogger-system-backend", "geny_2.13", "gson", "gson-extras", "guava", "j2objc-annotations", "jsr250-api", "jsr305", "jul-to-slf4j", "kotlin-stdlib", "kotlin-stdlib-common", "kotlin-stdlib-jdk7", "kotlin-stdlib-jdk8", "listenablefuture", "nice-xml-messages", "pcollections", "pkgforce_2.13", "pmd-core", "runforce", "scala-collection-compat_2.13", "scala-json-rpc-upickle-json-serializer_2.13", "scala-json-rpc_2.13", "scala-library", "scala-parallel-collections_2.13", "scala-reflect", "scala-xml_2.13", "slf4j-api", "summit-ast", "ujson_2.13", "upack_2.13", "upickle-core_2.13", "upickle-implicits_2.13", "upickle_2.13",
"pmd-html", "Saxon-HE", "antlr4-runtime", "asm", "checker-qual", "commons-lang3", "gson", "jsoup", "jul-to-slf4j", "nice-xml-messages", "pcollections", "pmd-core", "slf4j-api",
"pmd-java", "Saxon-HE", "antlr4-runtime", "asm", "checker-qual", "commons-lang3", "gson", "jul-to-slf4j", "nice-xml-messages", "pcollections", "pmd-core", "slf4j-api",
"pmd-javascript", "Saxon-HE", "antlr4-runtime", "asm", "checker-qual", "commons-lang3", "gson", "jul-to-slf4j", "nice-xml-messages", "pcollections", "pmd-core", "rhino", "slf4j-api",
"pmd-visualforce", "Saxon-HE", "antlr4-runtime", "apex-parser", "apexlink", "asm", "checker-compat-qual", "checker-qual", "commons-lang3", "error_prone_annotations", "failureaccess", "flogger", "flogger-system-backend", "geny_2.13", "gson", "gson-extras", "guava", "j2objc-annotations", "jsr250-api", "jsr305", "jul-to-slf4j", "kotlin-stdlib", "kotlin-stdlib-common", "kotlin-stdlib-jdk7", "kotlin-stdlib-jdk8", "listenablefuture", "nice-xml-messages", "pcollections", "pkgforce_2.13", "pmd-apex", "pmd-core", "runforce", "scala-collection-compat_2.13", "scala-json-rpc-upickle-json-serializer_2.13", "scala-json-rpc_2.13", "scala-library", "scala-parallel-collections_2.13", "scala-reflect", "scala-xml_2.13", "slf4j-api", "summit-ast", "ujson_2.13", "upack_2.13", "upickle-core_2.13", "upickle-implicits_2.13", "upickle_2.13",
"pmd-xml", "Saxon-HE", "antlr4-runtime", "asm", "checker-qual", "commons-lang3", "gson", "jul-to-slf4j", "nice-xml-messages", "pcollections", "pmd-core", "slf4j-api",
"pmd-apex", "Saxon-HE", "annotations", "antlr4-runtime", "apex-parser", "apexlink", "asm", "checker-compat-qual", "checker-qual", "commons-lang3", "error_prone_annotations", "failureaccess", "flogger", "flogger-system-backend", "geny_2.13", "gson", "gson-extras", "guava", "j2objc-annotations", "jsr250-api", "jsr305", "jul-to-slf4j", "kotlin-stdlib", "kotlin-stdlib-common", "kotlin-stdlib-jdk7", "kotlin-stdlib-jdk8", "listenablefuture", "nice-xml-messages", "pcollections", "pkgforce_2.13", "pmd-core", "runforce", "scala-collection-compat_2.13", "scala-json-rpc-upickle-json-serializer_2.13", "scala-json-rpc_2.13", "scala-library", "scala-parallel-collections_2.13", "scala-reflect", "scala-xml_2.13", "slf4j-api", "summit-ast", "ujson_2.13", "upack_2.13", "upickle-core_2.13", "upickle-implicits_2.13", "upickle_2.13", "xmlresolver",
"pmd-html", "Saxon-HE", "antlr4-runtime", "asm", "checker-qual", "commons-lang3", "gson", "jsoup", "jul-to-slf4j", "nice-xml-messages", "pcollections", "pmd-core", "slf4j-api", "xmlresolver",
"pmd-java", "Saxon-HE", "antlr4-runtime", "asm", "checker-qual", "commons-lang3", "gson", "jul-to-slf4j", "nice-xml-messages", "pcollections", "pmd-core", "slf4j-api", "xmlresolver",
"pmd-javascript", "Saxon-HE", "antlr4-runtime", "asm", "checker-qual", "commons-lang3", "gson", "jul-to-slf4j", "nice-xml-messages", "pcollections", "pmd-core", "rhino", "slf4j-api", "xmlresolver",
"pmd-visualforce", "Saxon-HE", "antlr4-runtime", "apex-parser", "apexlink", "asm", "checker-compat-qual", "checker-qual", "commons-lang3", "error_prone_annotations", "failureaccess", "flogger", "flogger-system-backend", "geny_2.13", "gson", "gson-extras", "guava", "j2objc-annotations", "jsr250-api", "jsr305", "jul-to-slf4j", "kotlin-stdlib", "kotlin-stdlib-common", "kotlin-stdlib-jdk7", "kotlin-stdlib-jdk8", "listenablefuture", "nice-xml-messages", "pcollections", "pkgforce_2.13", "pmd-apex", "pmd-core", "runforce", "scala-collection-compat_2.13", "scala-json-rpc-upickle-json-serializer_2.13", "scala-json-rpc_2.13", "scala-library", "scala-parallel-collections_2.13", "scala-reflect", "scala-xml_2.13", "slf4j-api", "summit-ast", "ujson_2.13", "upack_2.13", "upickle-core_2.13", "upickle-implicits_2.13", "upickle_2.13", "xmlresolver",
"pmd-xml", "Saxon-HE", "antlr4-runtime", "asm", "checker-qual", "commons-lang3", "gson", "jul-to-slf4j", "nice-xml-messages", "pcollections", "pmd-core", "slf4j-api", "xmlresolver",
// MAIN CLI MODULE DEPENDENCIES (direct and indirect)
"pmd-cli", "Saxon-HE", "antlr4-runtime", "asm", "checker-qual", "commons-lang3", "gson", "jline", "jul-to-slf4j", "nice-xml-messages", "pcollections", "picocli", "pmd-core", "progressbar", "slf4j-api", "slf4j-simple",
"pmd-cli", "Saxon-HE", "antlr4-runtime", "asm", "checker-qual", "commons-lang3", "gson", "jline", "jul-to-slf4j", "nice-xml-messages", "pcollections", "picocli", "pmd-core", "progressbar", "slf4j-api", "slf4j-simple", "xmlresolver",
)
val pmd7JarsToIncludeRegexes = mutableSetOf("""^LICENSE""".toRegex())
pmd7ModulesToInclude.forEach {
Expand All @@ -102,7 +102,7 @@ tasks.register<Copy>("installPmd7") {
into(pmd7DistDir)
includeEmptyDirs = false
eachFile {
// We drop the parent "pmd-bin-7.0.0" folder and put files directly into our "pmd7" folder
// We drop the parent "pmd-bin-7.1.0" folder and put files directly into our "pmd7" folder
relativePath = RelativePath(true, *relativePath.segments.drop(1).toTypedArray())
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os = require('os');
import path = require('path');

export const PMD7_VERSION = '7.0.0';
export const PMD7_VERSION = '7.1.0';
export const PMD_APPEXCHANGE_RULES_VERSION = '0.12';
export const SFGE_VERSION = '1.0.1-pilot';
export const DEFAULT_SCANNER_PATH = path.join(os.homedir(), '.sfdx-scanner');
Expand Down

0 comments on commit 5d8aba6

Please sign in to comment.