Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7a264ee
@W-14989109@: Restore plugin linkability by fixing a few imports
stephen-carter-at-sf Feb 7, 2024
bedf209
Merge pull request #1351 from forcedotcom/d/W-14989109
stephen-carter-at-sf Feb 8, 2024
4466c60
@W-14980216@: [PMD7-Preview](Part 1) Refactor pmd and cpd engines to …
stephen-carter-at-sf Feb 6, 2024
4d7991c
@W-14980258@: Add pmd7 download, install, and cleanup tasks to our gr…
stephen-carter-at-sf Feb 7, 2024
3fa79c1
@W-14980290@: Implement Pmd7CommandInfo to allow us to call pmd7 jars
stephen-carter-at-sf Feb 8, 2024
b47bd26
@W-14980337@: Optimize the pmd6 and pmd7 binary distributions
stephen-carter-at-sf Feb 12, 2024
2904d2c
@W-15041815@: Force the global --json flag to show up in our help text
stephen-carter-at-sf Feb 14, 2024
c8f83ec
Merge pull request #1352 from forcedotcom/d/W-14980290
stephen-carter-at-sf Feb 14, 2024
e40c03d
@W-14980315@: Add --preview-pmd7 to run, rule describe, and rule list
stephen-carter-at-sf Feb 9, 2024
b7897be
Merge pull request #1358 from forcedotcom/d/W-15041815
stephen-carter-at-sf Feb 14, 2024
0f37290
Merge pull request #1353 from forcedotcom/d/W-14980315
stephen-carter-at-sf Feb 14, 2024
0ba0a59
Merge pull request #1357 from forcedotcom/d/W-14980337
stephen-carter-at-sf Feb 14, 2024
96acf31
@W-15041815@: Force the global --json flag to show up in our help text
stephen-carter-at-sf Feb 14, 2024
cb25f29
Merge branch 'dev' into d/preview-pmd7
stephen-carter-at-sf Feb 14, 2024
d66b6da
Merge pull request #1359 from forcedotcom/d/preview-pmd7
stephen-carter-at-sf Feb 14, 2024
43fd85c
@W-15059732@: scanner rule describe now includes runWith column.
jfeingold35 Feb 16, 2024
21df520
Merge pull request #1362 from forcedotcom/d/W-15059732
jfeingold35 Feb 19, 2024
8283360
@W-14945179@: Added deprecation warning for Java v1.8.
jfeingold35 Feb 15, 2024
4b5dec2
@W-14945179@: Switched to approved message.
jfeingold35 Feb 19, 2024
55ac4ff
@W-14945179@: Implemented feedback from review.
jfeingold35 Feb 19, 2024
f53509f
Merge pull request #1364 from forcedotcom/d/W-14945179
jfeingold35 Feb 19, 2024
6e21ddc
FIX (CodeAnalyzer): @W-14901310@: Restored error-always event.
jfeingold35 Feb 20, 2024
1c9d0e5
Merge pull request #1365 from forcedotcom/d/W-14901310
jfeingold35 Feb 20, 2024
63dde9e
CHANGE (CodeAnalyzer): @W-14645433@: Refactored test coverage for co…
jfeingold35 Feb 21, 2024
44b9ddf
CHANGE (CodeAnalyzer): @W-14645433@: Refactored tests for scanner rul…
jfeingold35 Feb 23, 2024
f49e127
CHANGE (CodeAnalyzer): @W-14645433@: Refactored tests for scanner rul…
jfeingold35 Feb 23, 2024
f92b45a
CHANGE (CodeAnalyzer): @W-14645433@: Refactored tests for scanner rul…
jfeingold35 Feb 23, 2024
a546060
fix: publish npm-shrinkwrap.json
mdonnalley Feb 26, 2024
e63c32f
fix: typo
mdonnalley Feb 26, 2024
33dc6b2
CHANGE (CodeAnalyzer): @W-14645433@: Refactored test coverage for sca…
jfeingold35 Feb 26, 2024
2b6983b
CHANGE (CodeAnalyzer): @W-14645433@: Fixing broken windows tests.
jfeingold35 Feb 27, 2024
8f3d651
Merge pull request #1368 from forcedotcom/d/W-14645433
jfeingold35 Feb 28, 2024
a159e56
Merge branch 'dev' into mdonnalley/shrinkwrap
stephen-carter-at-sf Feb 28, 2024
44280a7
Merge pull request #1369 from mdonnalley/mdonnalley/shrinkwrap
jfeingold35 Feb 29, 2024
f4e23a7
CHANGE (CodeAnalyzer): @W-14645433@: Refactored CPD-related list tests.
jfeingold35 Mar 1, 2024
18ef5bc
CHANGE (CodeAnalyzer): @W-14645433@: Refactored some scanner run tests.
jfeingold35 Mar 1, 2024
8039a4a
@W-15142453@: Update help text to match latest command reference changes
stephen-carter-at-sf Mar 1, 2024
6a970d7
Merge pull request #1373 from forcedotcom/d/W-14645433-b
jfeingold35 Mar 1, 2024
7b20154
Merge branch 'dev' into d/W-15142453
stephen-carter-at-sf Mar 5, 2024
39f2d6e
Merge pull request #1374 from forcedotcom/d/W-15142453
stephen-carter-at-sf Mar 5, 2024
11e40b1
CHANGE (CodeAnalyzer): @W-14645433@: Fixed some broken tests. (#1381)
jfeingold35 Mar 7, 2024
088702f
CHANGE (CodeAnalyzer): @W-14645433@: Increased enforced code coverage…
jfeingold35 Mar 11, 2024
3df553b
CHANGE (CodeAnalyzer): @W-15214308@: Updating package version for 3.2…
jfeingold35 Mar 11, 2024
dd8a51d
Merge branch 'release' into dev
stephen-carter-at-sf Mar 11, 2024
3935a5b
CHANGE (CodeAnalyzer): @W-15214308@: Update retire js vuln (#1391)
stephen-carter-at-sf Mar 12, 2024
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,5 @@ oclif.lock
pmd-cataloger/bin

sfge*.log.gz

npm-shrinkwrap.json
10 changes: 9 additions & 1 deletion messages/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ one or more paths (such as a directory or JAR file) to custom rule definitions

# flags.pathDescription

One or more paths (such as a directory or JAR file) to custom rule definitions. Specify multiple values as a comma-separated list.
One or more paths (such as a directory or JAR file) to custom rule definitions. Specify multiple values as a comma-separated list.

# validations.languageCannotBeEmpty

Expand All @@ -30,6 +30,14 @@ Specify a language

Specify a path

# output.successfullyAddedRules

Successfully added rules for %s.

# output.resultSummary

%s Path(s) added: %s

# examples

Bundle custom PMD rules in JAR files. Follow PMD conventions, such as defining the custom rules in XML files under a `/category/` directory.
Expand Down
4 changes: 4 additions & 0 deletions messages/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

emit additional command output to stdout

# flags.verboseDescription

Emit additional command output to stdout.

# surveyRequestMessage

We're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at https://research.net/r/SalesforceCA
8 changes: 8 additions & 0 deletions messages/describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ the name of the rule

The name of the rule.

# flags.previewPmd7Summary

use PMD version %s to describe PMD and CPD rules

# flags.previewPmd7Description

Uses PMD version %s instead of %s to describe PMD and CPD rules.

# output.noMatchingRules

No rules were found with the name '%s'.
Expand Down
6 changes: 5 additions & 1 deletion messages/jreSetupManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ If the problem persists, please manually add a 'javaHome' property to your Confi

# InvalidVersion

Java version %s isn't supported. Install Java 1.8 or later.
Java version %s isn't supported. Install Java 1.8 or later.

# warning.JavaV8Deprecated

Code Analyzer requires Java v11 or later. Update to Java v11 and update the `javaHome` property in your `%s` file.
12 changes: 10 additions & 2 deletions messages/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Selects rules by category. Enter multiple values as a comma-separated list.

# flags.rulesetSummary

[deprecated] select rules by ruleset
[Deprecated] select rules by ruleset

# flags.rulesetDescription

[deprecated] Selects rules by ruleset. Enter multiple values as a comma-separated list.
Deprecated. Use category instead. Selects rules by ruleset. Enter multiple values as a comma-separated list.

# flags.engineSummary

Expand All @@ -38,6 +38,14 @@ select rules by engine

Selects rules by engine. Enter multiple engines as a comma-separated list.

# flags.previewPmd7Summary

use PMD version %s to list PMD and CPD rules

# flags.previewPmd7Description

Uses PMD version %s instead of %s to list PMD and CPD rules.

# rulesetDeprecation

The 'ruleset' command parameter is deprecated. Use 'category' instead
Expand Down
2 changes: 1 addition & 1 deletion messages/run-common.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ specify results output format

# flags.formatDescription

Specifies results output format written directly to the console.
Specifies the output format for results written directly to the console.

# flags.normalizesevSummary

Expand Down
6 changes: 3 additions & 3 deletions messages/run-dfa.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ specify a path expansion upper boundary to limit the complexity of code that Gr

# flags.pathexplimitDescription

Specifies a path expansion upper boundary to limit the complexity of code Graph Engine analyzes before failing fast. Set the value to -1 to remove any upper boundary. --pathexplimit inherits value from SFGE_PATH_EXPANSION_LIMIT env-var, if set. Its default value is derived from JVM heap space allocation.
Specifies a path expansion upper boundary to limit the complexity of code Graph Engine analyzes before failing fast. Set the value to -1 to remove any upper boundary. --pathexplimit inherits value from SFGE_PATH_EXPANSION_LIMIT env-var, if set. Its default value is derived from JVM heap space allocation.

# flags.ruledisablewarningviolationSummary

Expand All @@ -29,15 +29,15 @@ specify number of threads that evaluate DFA rules. Alternatively, set value usin

# flags.rulethreadcountDescription

Specifies number of rule evaluation threads, or how many entrypoints can be evaluated concurrently. Inherits value from SFGE_RULE_THREAD_COUNT env-var, if set. Default is 4.
Specifies the number of rule-evaluation threads or how many entry points can be evaluated concurrently. Inherits its value from the SFGE_RULE_THREAD_COUNT environment variable, if set. The default is 4.

# flags.rulethreadtimeoutSummary

specify timeout for individual rule threads in milliseconds. Alternatively, set the timeout value using environment variable `SFGE_RULE_THREAD_TIMEOUT`. Default: 900000 ms

# flags.rulethreadtimeoutDescription

Specifies time limit for evaluating a single entrypoint in milliseconds. Inherits value from SFGE_RULE_THREAD_TIMEOUT env-var if set. Default is 900,000 ms, or 15 minutes.
Specifies the time limit for evaluating a single entry point in milliseconds. Inherits its value from the SFGE_RULE_THREAD_TIMEOUT environment variable, if set. The default is 900,000 ms or 15 minutes.

# flags.sfgejvmargsSummary

Expand Down
26 changes: 17 additions & 9 deletions messages/run-pathless.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ Scans a codebase with a selection of rules. You can scan the codebase with all t

# flags.rulesetSummary

[deprecated] rulesets to run
[Deprecated] rulesets to run

# flags.rulesetDescription

[deprecated] One or more rulesets to run. Specify multiple values as a comma-separated list.
Deprecated. Use category instead. One or more rulesets to run. Specify multiple values as a comma-separated list.

# flags.targetSummary

source code location

# flags.targetDescription

Specifies the source code location. May use glob patterns. Specify multiple values as a comma-separated list. Default is ".".
Specifies the source code location. Can use glob patterns. Specify multiple values as a comma-separated list. Default is ".".

# flags.envSummary

[deprecated] override ESLint's default environment variables, in JSON-formatted string
[Deprecated] override ESLint's default environment variables, in JSON-formatted string

# flags.envDescription

[deprecated] Overrides ESLint's default environmental variables, in JSON-formatted string.
Deprecated. Overrides ESLint's default environmental variables, in JSON-formatted string.

# flags.envParamDeprecationWarning

Expand All @@ -40,7 +40,7 @@ location of tsconfig.json file

# flags.tsconfigDescription

Location of tsconfig.json file used by eslint-typescript engine.
The location of the tsconfig.json file used by the eslint-typescript engine. The --tsconfig flag can’t be used with --eslintconfig flag.

# flags.engineSummary

Expand All @@ -56,23 +56,31 @@ specify the location of eslintrc config to customize eslint engine

# flags.eslintConfigDescription

Specifies the location of eslintrc config to customize eslint engine.
Specifies the location of eslintrc config to customize ESLint engine. The --tsconfig flag can’t be used with --eslintconfig flag.

# flags.pmdConfigSummary

specify location of PMD rule reference XML file to customize rule selection

# flags.pmdConfigDescription

Specifies the location of PMD rule reference XML file to customize rule selection.
Specifies the location of the PMD rule reference XML file to customize rule selection.

# flags.previewPmd7Summary

use PMD version %s when running PMD and CPD

# flags.previewPmd7Description

Uses PMD version %s instead of %s when running PMD and CPD engines.

# flags.verboseViolationsSummary

return retire-js violation message details

# flags.verboseViolationsDescription

Returns retire-js violation messages details about each vulnerability, including summary, Common Vulnerabilities and Exposures (CVE), and URLs.
Returns retire-js violation-message details about each vulnerability, including summary, common vulnerabilities and exposures (CVE), and URLs.

# validations.methodLevelTargetingDisallowed

Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@salesforce/sfdx-scanner",
"description": "Static code scanner that applies quality and security rules to Apex code, and provides feedback.",
"version": "3.21.0",
"version": "3.22.0",
"author": "ISV SWAT",
"bugs": "https://github.com/forcedotcom/sfdx-scanner/issues",
"dependencies": {
Expand All @@ -14,6 +14,7 @@
"@salesforce/eslint-config-lwc": "^3.2.1",
"@salesforce/eslint-plugin-lightning": "^1.0.0",
"@salesforce/sf-plugins-core": "^5.0.4",
"@types/wordwrap": "^1.0.3",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"cross-spawn": "^7.0.3",
Expand All @@ -40,7 +41,6 @@
"typescript": "~5.1.0",
"untildify": "^4.0.0",
"uuid": "^9.0.0",
"word-wrap": "^1.2.3",
"xml-js": "^1.6.11"
},
"resolutions": {
Expand Down Expand Up @@ -69,6 +69,7 @@
"@types/picomatch": "^2.3.0",
"@types/sarif": "^2.1.4",
"@types/semver": "^7.3.9",
"@types/sinon": "^17.0.3",
"@types/tmp": "^0.2.3",
"@types/uuid": "^8.3.4",
"chai": "^4",
Expand All @@ -78,7 +79,7 @@
"mocha-junit-reporter": "^2.0.0",
"nyc": "^15.0.0",
"oclif": "^4.0.3",
"sinon": "^13",
"sinon": "^17",
"tildify": "^2.0.0",
"ts-mockito": "^2.6.1"
},
Expand Down Expand Up @@ -128,16 +129,16 @@
"flexibleTaxonomy": true
},
"nyc": {
"branches": "60",
"lines": "75",
"functions": "75",
"statements": "75"
"branches": "75",
"lines": "85",
"functions": "85",
"statements": "85"
},
"repository": "forcedotcom/sfdx-scanner",
"scripts": {
"build": "./gradlew build -x test",
"prepack": "rm -rf lib && tsc -b && oclif manifest && oclif readme && oclif lock",
"postpack": "rm -f oclif.manifest.json",
"prepack": "rm -rf lib && tsc -b && oclif manifest && oclif readme && oclif lock && npm shrinkwrap",
"postpack": "rm -f oclif.manifest.json oclif.lock npm-shrinkwrap.json",
"lint-typescript": "eslint ./src --ext .ts --max-warnings 0",
"test": "./gradlew test jacocoTestCoverageVerification && nyc mocha --timeout 10000 --retries 5 \"./test/**/*.test.ts\"",
"test-quiet": "cross-env SFGE_LOGGING=false ./gradlew test jacocoTestCoverageVerification && nyc mocha --timeout 10000 --retries 5 \"./test/**/*.test.ts\"",
Expand Down
Loading