Skip to content

Commit 78c8fc5

Browse files
jfeingold35stephen-carter-at-sfmdonnalley
authored
RELEASE: @W-15214308@: Merging dev to release for v3.22.0 (#1388)
Co-authored-by: Stephen Carter <[email protected]> Co-authored-by: Stephen Carter <[email protected]> Co-authored-by: Mike Donnalley <[email protected]>
1 parent bd3785d commit 78c8fc5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3862
-1683
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,5 @@ oclif.lock
157157
pmd-cataloger/bin
158158

159159
sfge*.log.gz
160+
161+
npm-shrinkwrap.json

messages/add.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ one or more paths (such as a directory or JAR file) to custom rule definitions
2020

2121
# flags.pathDescription
2222

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

2525
# validations.languageCannotBeEmpty
2626

@@ -30,6 +30,14 @@ Specify a language
3030

3131
Specify a path
3232

33+
# output.successfullyAddedRules
34+
35+
Successfully added rules for %s.
36+
37+
# output.resultSummary
38+
39+
%s Path(s) added: %s
40+
3341
# examples
3442

3543
Bundle custom PMD rules in JAR files. Follow PMD conventions, such as defining the custom rules in XML files under a `/category/` directory.

messages/common.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
emit additional command output to stdout
44

5+
# flags.verboseDescription
6+
7+
Emit additional command output to stdout.
8+
59
# surveyRequestMessage
610

711
We're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at https://research.net/r/SalesforceCA

messages/describe.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ the name of the rule
1414

1515
The name of the rule.
1616

17+
# flags.previewPmd7Summary
18+
19+
use PMD version %s to describe PMD and CPD rules
20+
21+
# flags.previewPmd7Description
22+
23+
Uses PMD version %s instead of %s to describe PMD and CPD rules.
24+
1725
# output.noMatchingRules
1826

1927
No rules were found with the name '%s'.

messages/jreSetupManager.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ If the problem persists, please manually add a 'javaHome' property to your Confi
1818

1919
# InvalidVersion
2020

21-
Java version %s isn't supported. Install Java 1.8 or later.
21+
Java version %s isn't supported. Install Java 1.8 or later.
22+
23+
# warning.JavaV8Deprecated
24+
25+
Code Analyzer requires Java v11 or later. Update to Java v11 and update the `javaHome` property in your `%s` file.

messages/list.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Selects rules by category. Enter multiple values as a comma-separated list.
2424

2525
# flags.rulesetSummary
2626

27-
[deprecated] select rules by ruleset
27+
[Deprecated] select rules by ruleset
2828

2929
# flags.rulesetDescription
3030

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

3333
# flags.engineSummary
3434

@@ -38,6 +38,14 @@ select rules by engine
3838

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

41+
# flags.previewPmd7Summary
42+
43+
use PMD version %s to list PMD and CPD rules
44+
45+
# flags.previewPmd7Description
46+
47+
Uses PMD version %s instead of %s to list PMD and CPD rules.
48+
4149
# rulesetDeprecation
4250

4351
The 'ruleset' command parameter is deprecated. Use 'category' instead

messages/run-common.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ specify results output format
1212

1313
# flags.formatDescription
1414

15-
Specifies results output format written directly to the console.
15+
Specifies the output format for results written directly to the console.
1616

1717
# flags.normalizesevSummary
1818

messages/run-dfa.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ specify a path expansion upper boundary to limit the complexity of code that Gr
1313

1414
# flags.pathexplimitDescription
1515

16-
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.
16+
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.
1717

1818
# flags.ruledisablewarningviolationSummary
1919

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

3030
# flags.rulethreadcountDescription
3131

32-
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.
32+
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.
3333

3434
# flags.rulethreadtimeoutSummary
3535

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

3838
# flags.rulethreadtimeoutDescription
3939

40-
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.
40+
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.
4141

4242
# flags.sfgejvmargsSummary
4343

messages/run-pathless.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ Scans a codebase with a selection of rules. You can scan the codebase with all t
88

99
# flags.rulesetSummary
1010

11-
[deprecated] rulesets to run
11+
[Deprecated] rulesets to run
1212

1313
# flags.rulesetDescription
1414

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

1717
# flags.targetSummary
1818

1919
source code location
2020

2121
# flags.targetDescription
2222

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

2525
# flags.envSummary
2626

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

2929
# flags.envDescription
3030

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

3333
# flags.envParamDeprecationWarning
3434

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

4141
# flags.tsconfigDescription
4242

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

4545
# flags.engineSummary
4646

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

5757
# flags.eslintConfigDescription
5858

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

6161
# flags.pmdConfigSummary
6262

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

6565
# flags.pmdConfigDescription
6666

67-
Specifies the location of PMD rule reference XML file to customize rule selection.
67+
Specifies the location of the PMD rule reference XML file to customize rule selection.
68+
69+
# flags.previewPmd7Summary
70+
71+
use PMD version %s when running PMD and CPD
72+
73+
# flags.previewPmd7Description
74+
75+
Uses PMD version %s instead of %s when running PMD and CPD engines.
6876

6977
# flags.verboseViolationsSummary
7078

7179
return retire-js violation message details
7280

7381
# flags.verboseViolationsDescription
7482

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

7785
# validations.methodLevelTargetingDisallowed
7886

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@salesforce/sfdx-scanner",
33
"description": "Static code scanner that applies quality and security rules to Apex code, and provides feedback.",
4-
"version": "3.21.0",
4+
"version": "3.22.0",
55
"author": "ISV SWAT",
66
"bugs": "https://github.com/forcedotcom/sfdx-scanner/issues",
77
"dependencies": {
@@ -14,6 +14,7 @@
1414
"@salesforce/eslint-config-lwc": "^3.2.1",
1515
"@salesforce/eslint-plugin-lightning": "^1.0.0",
1616
"@salesforce/sf-plugins-core": "^5.0.4",
17+
"@types/wordwrap": "^1.0.3",
1718
"@typescript-eslint/eslint-plugin": "^5.62.0",
1819
"@typescript-eslint/parser": "^5.62.0",
1920
"cross-spawn": "^7.0.3",
@@ -40,7 +41,6 @@
4041
"typescript": "~5.1.0",
4142
"untildify": "^4.0.0",
4243
"uuid": "^9.0.0",
43-
"word-wrap": "^1.2.3",
4444
"xml-js": "^1.6.11"
4545
},
4646
"resolutions": {
@@ -69,6 +69,7 @@
6969
"@types/picomatch": "^2.3.0",
7070
"@types/sarif": "^2.1.4",
7171
"@types/semver": "^7.3.9",
72+
"@types/sinon": "^17.0.3",
7273
"@types/tmp": "^0.2.3",
7374
"@types/uuid": "^8.3.4",
7475
"chai": "^4",
@@ -78,7 +79,7 @@
7879
"mocha-junit-reporter": "^2.0.0",
7980
"nyc": "^15.0.0",
8081
"oclif": "^4.0.3",
81-
"sinon": "^13",
82+
"sinon": "^17",
8283
"tildify": "^2.0.0",
8384
"ts-mockito": "^2.6.1"
8485
},
@@ -128,16 +129,16 @@
128129
"flexibleTaxonomy": true
129130
},
130131
"nyc": {
131-
"branches": "60",
132-
"lines": "75",
133-
"functions": "75",
134-
"statements": "75"
132+
"branches": "75",
133+
"lines": "85",
134+
"functions": "85",
135+
"statements": "85"
135136
},
136137
"repository": "forcedotcom/sfdx-scanner",
137138
"scripts": {
138139
"build": "./gradlew build -x test",
139-
"prepack": "rm -rf lib && tsc -b && oclif manifest && oclif readme && oclif lock",
140-
"postpack": "rm -f oclif.manifest.json",
140+
"prepack": "rm -rf lib && tsc -b && oclif manifest && oclif readme && oclif lock && npm shrinkwrap",
141+
"postpack": "rm -f oclif.manifest.json oclif.lock npm-shrinkwrap.json",
141142
"lint-typescript": "eslint ./src --ext .ts --max-warnings 0",
142143
"test": "./gradlew test jacocoTestCoverageVerification && nyc mocha --timeout 10000 --retries 5 \"./test/**/*.test.ts\"",
143144
"test-quiet": "cross-env SFGE_LOGGING=false ./gradlew test jacocoTestCoverageVerification && nyc mocha --timeout 10000 --retries 5 \"./test/**/*.test.ts\"",

0 commit comments

Comments
 (0)