Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,212 changes: 598 additions & 614 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"devDependencies": {
"cross-env": "^10.0.0",
"husky": "^9.1.7",
"jest": "^30.0.5",
"jest": "^30.1.3",
"rimraf": "^6.0.1",
"semver": "^7.7.2",
"ts-jest": "^29.4.1"
"ts-jest": "^29.4.2"
},
"jest": {
"testTimeout": 60000,
Expand Down
12 changes: 6 additions & 6 deletions packages/ENGINE-TEMPLATE/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
"@salesforce/code-analyzer-engine-api": "0.29.0-SNAPSHOT"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
"@eslint/js": "^9.35.0",
"@types/jest": "^30.0.0",
"eslint": "^9.32.0",
"jest": "^30.0.5",
"eslint": "^9.35.0",
"jest": "^30.1.3",
"rimraf": "^6.0.1",
"ts-jest": "^29.4.1",
"ts-jest": "^29.4.2",
"typescript": "^5.9.2",
"typescript-eslint": "^8.37.0"
"typescript-eslint": "^8.44.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down Expand Up @@ -60,4 +60,4 @@
"!src/index.ts"
]
}
}
}
14 changes: 7 additions & 7 deletions packages/code-analyzer-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
"js-yaml": "^4.1.0",
"semver": "^7.7.2",
"xmlbuilder": "^15.1.1",
"tmp": "^0.2.3"
"tmp": "^0.2.5"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
"@eslint/js": "^9.35.0",
"@types/js-yaml": "^4.0.9",
"@types/jest": "^30.0.0",
"@types/sarif": "^2.1.7",
"@types/semver": "^7.7.1",
"@types/tmp": "^0.2.6",
"cross-env": "^10.0.0",
"eslint": "^9.32.0",
"jest": "^30.0.5",
"eslint": "^9.35.0",
"jest": "^30.1.3",
"rimraf": "^6.0.1",
"ts-jest": "^29.4.1",
"ts-jest": "^29.4.2",
"typescript": "^5.9.2",
"typescript-eslint": "^8.37.0"
"typescript-eslint": "^8.44.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down Expand Up @@ -74,4 +74,4 @@
"!src/index.ts"
]
}
}
}
12 changes: 6 additions & 6 deletions packages/code-analyzer-engine-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"@types/node": "^20.0.0"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
"@eslint/js": "^9.35.0",
"@types/jest": "^30.0.0",
"eslint": "^9.32.0",
"jest": "^30.0.5",
"eslint": "^9.35.0",
"jest": "^30.1.3",
"rimraf": "^6.0.1",
"ts-jest": "^29.4.1",
"ts-jest": "^29.4.2",
"typescript": "^5.9.2",
"typescript-eslint": "^8.37.0"
"typescript-eslint": "^8.44.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down Expand Up @@ -63,4 +63,4 @@
"!src/utils/index.ts"
]
}
}
}
20 changes: 10 additions & 10 deletions packages/code-analyzer-eslint-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,33 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"dependencies": {
"@eslint/js": "^9.32.0",
"@eslint/js": "^9.35.0",
"@lwc/eslint-plugin-lwc": "^3.2.0",
"@lwc/eslint-plugin-lwc-platform": "^6.1.0",
"@salesforce-ux/eslint-plugin-slds": "^0.5.0",
"@salesforce-ux/eslint-plugin-slds": "^0.5.3",
"@salesforce/code-analyzer-engine-api": "0.29.0-SNAPSHOT",
"@salesforce/code-analyzer-eslint8-engine": "0.6.0-SNAPSHOT",
"@salesforce/eslint-config-lwc": "^4.0.0",
"@salesforce/eslint-plugin-lightning": "^2.0.0",
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "^8.39.0",
"@typescript-eslint/parser": "^8.33.1",
"eslint": "^9.32.0",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/parser": "^8.44.0",
"eslint": "^9.35.0",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jest": "^29.0.1",
"globals": "^16.3.0",
"globals": "^16.4.0",
"semver": "^7.7.2",
"typescript": "^5.9.2",
"typescript-eslint": "^8.37.0"
"typescript-eslint": "^8.44.0"
},
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/semver": "^7.7.1",
"@types/unzipper": "^0.10.11",
"cross-env": "^10.0.0",
"jest": "^30.0.5",
"jest": "^30.1.3",
"rimraf": "^6.0.1",
"ts-jest": "^29.4.1",
"ts-jest": "^29.4.2",
"unzipper": "^0.12.3"
},
"engines": {
Expand Down Expand Up @@ -76,4 +76,4 @@
"!src/index.ts"
]
}
}
}
4 changes: 4 additions & 0 deletions packages/code-analyzer-eslint-engine/src/rule-mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,10 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
severity: SeverityLevel.Moderate,
tags: [/* NOT RECOMMENDED */ COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT, COMMON_TAGS.LANGUAGES.TYPESCRIPT]
},
"preserve-caught-error": {
severity: SeverityLevel.Low,
tags: [/* NOT RECOMMENDED */ COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT, COMMON_TAGS.LANGUAGES.TYPESCRIPT]
},
"radix": {
severity: SeverityLevel.Moderate,
tags: [/* NOT RECOMMENDED */ COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT, COMMON_TAGS.LANGUAGES.TYPESCRIPT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2398,6 +2398,19 @@
"TypeScript"
]
},
{
"description": "Disallow losing originally caught error when re-throwing custom errors",
"name": "preserve-caught-error",
"resourceUrls": [
"https://eslint.org/docs/latest/rules/preserve-caught-error"
],
"severityLevel": 4,
"tags": [
"BestPractices",
"JavaScript",
"TypeScript"
]
},
{
"description": "Enforce the consistent use of the radix argument when using `parseInt()`",
"name": "radix",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3420,6 +3420,19 @@
"TypeScript"
]
},
{
"description": "Disallow losing originally caught error when re-throwing custom errors",
"name": "preserve-caught-error",
"resourceUrls": [
"https://eslint.org/docs/latest/rules/preserve-caught-error"
],
"severityLevel": 4,
"tags": [
"BestPractices",
"JavaScript",
"TypeScript"
]
},
{
"description": "Enforce the consistent use of the radix argument when using `parseInt()`",
"name": "radix",
Expand Down
6 changes: 3 additions & 3 deletions packages/code-analyzer-eslint8-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"@types/jest": "^30.0.0",
"@types/unzipper": "^0.10.11",
"cross-env": "^10.0.0",
"jest": "^30.0.5",
"jest": "^30.1.3",
"rimraf": "^6.0.1",
"ts-jest": "^29.4.1",
"ts-jest": "^29.4.2",
"unzipper": "^0.12.3"
},
"engines": {
Expand Down Expand Up @@ -75,4 +75,4 @@
"!src/index.ts"
]
}
}
}
12 changes: 6 additions & 6 deletions packages/code-analyzer-flow-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"semver": "^7.7.2"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
"@eslint/js": "^9.35.0",
"@types/jest": "^30.0.0",
"eslint": "^9.32.0",
"jest": "^30.0.5",
"eslint": "^9.35.0",
"jest": "^30.1.3",
"rimraf": "^6.0.1",
"ts-jest": "^29.4.1",
"ts-jest": "^29.4.2",
"typescript": "^5.9.2",
"typescript-eslint": "^8.37.0"
"typescript-eslint": "^8.44.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down Expand Up @@ -63,4 +63,4 @@
"!src/index.ts"
]
}
}
}
4 changes: 2 additions & 2 deletions packages/code-analyzer-pmd-engine/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

[versions]
hamcrest = "3.0"
junit-jupiter = "5.12.2"
pmd = "7.16.0" # !!! IMPORTANT !!! KEEP THIS IN SYNC WITH PMD_VERSION INSIDE OF: src/constants.ts
junit-jupiter = "5.13.4"
pmd = "7.17.0" # !!! IMPORTANT !!! KEEP THIS IN SYNC WITH PMD_VERSION INSIDE OF: src/constants.ts

# For the following: Keep in sync with whatever pmd-core pulls in. Basically, we don't want duplicates in our java-lib folder.
# To see pmd-core's dependencies, go to https://mvnrepository.com/artifact/net.sourceforge.pmd/pmd-core
Expand Down
12 changes: 6 additions & 6 deletions packages/code-analyzer-pmd-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"semver": "^7.7.2"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
"@eslint/js": "^9.35.0",
"@types/jest": "^30.0.0",
"eslint": "^9.32.0",
"jest": "^30.0.5",
"eslint": "^9.35.0",
"jest": "^30.1.3",
"rimraf": "^6.0.1",
"ts-jest": "^29.4.1",
"ts-jest": "^29.4.2",
"typescript": "^5.9.2",
"typescript-eslint": "^8.37.0"
"typescript-eslint": "^8.44.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down Expand Up @@ -71,4 +71,4 @@
"!src/index.ts"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ global class PackageInstallHandler implements InstallHandler {
}
]]></code>
</test-code>

<test-code>
<description>When the InstallHandler interface is extended on a public class, then do not report a violation</description>
<expected-problems>0</expected-problems>
Expand All @@ -26,6 +27,8 @@ public class PackageInstallHandler implements InstallHandler{
}
}
]]></code>
</test-code>

<test-code>
<description>When the UninstallHandler interface is extended on a global class, then report a violation</description>
<expected-problems>1</expected-problems>
Expand All @@ -38,7 +41,6 @@ global with sharing class PackageUninstallHandler implements UninstallHandler{
}
]]></code>
</test-code>
</test-code>

<test-code>
<description>When the UninstallHandler interface is extended on a public class, then do not report a violation</description>
Expand Down
2 changes: 1 addition & 1 deletion packages/code-analyzer-pmd-engine/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// !!! IMPORTANT !!! KEEP THIS IN SYNC WITH gradle/libs.versions.toml
export const PMD_VERSION: string = '7.16.0';
export const PMD_VERSION: string = '7.17.0';

export const PMD_ENGINE_NAME: string = "pmd";
export const CPD_ENGINE_NAME: string = "cpd";
Expand Down
4 changes: 4 additions & 0 deletions packages/code-analyzer-pmd-engine/src/pmd-rule-mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
// =================================================================================================================
// PMD-APEX RULES
// =================================================================================================================
"AnnotationsNamingConventions": {
severity: SeverityLevel.Low,
tags: [COMMON_TAGS.RECOMMENDED, COMMON_TAGS.CATEGORIES.CODE_STYLE, COMMON_TAGS.LANGUAGES.APEX]
},
"ApexAssertionsShouldIncludeMessage": {
severity: SeverityLevel.Moderate,
tags: [/* NOT RECOMMENDED */ COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.APEX]
Expand Down
1 change: 0 additions & 1 deletion packages/code-analyzer-pmd-engine/test/pmd-engine.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import path from "node:path";
import {Language, PMD_VERSION} from "../src/constants";
import {DEFAULT_PMD_ENGINE_CONFIG, PMD_AVAILABLE_LANGUAGES, PmdEngineConfig} from "../src/config";
import {PmdCpdEnginesPlugin} from "../src";
import os from "node:os";

changeWorkingDirectoryToPackageRoot();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
[
{
"name": "AnnotationsNamingConventions",
"severityLevel": 4,
"tags": [
"Recommended",
"CodeStyle",
"Apex"
],
"description": "Apex, while case-insensitive, benefits from a consistent code style to improve readability and maintainability. Enforcing PascalCase for annotations aligns with the established conventions and reduces ambiguity - promoting a unified coding standard.",
"resourceUrls": [
"https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_codestyle.html#annotationsnamingconventions"
]
},
{
"name": "ApexAssertionsShouldIncludeMessage",
"severityLevel": 3,
Expand Down
12 changes: 6 additions & 6 deletions packages/code-analyzer-regex-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"p-limit": "^3.1.0"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
"@eslint/js": "^9.35.0",
"@types/jest": "^30.0.0",
"eslint": "^9.32.0",
"jest": "^30.0.5",
"eslint": "^9.35.0",
"jest": "^30.1.3",
"rimraf": "^6.0.1",
"ts-jest": "^29.4.1",
"ts-jest": "^29.4.2",
"typescript": "^5.9.2",
"typescript-eslint": "^8.37.0"
"typescript-eslint": "^8.44.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down Expand Up @@ -62,4 +62,4 @@
"!src/index.ts"
]
}
}
}
Loading
Loading