@salesforce/cli 2.16.6 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -24
- package/npm-shrinkwrap.json +604 -906
- package/oclif.manifest.json +534 -251
- package/package.json +11 -9
package/oclif.manifest.json
CHANGED
|
@@ -2939,6 +2939,13 @@
|
|
|
2939
2939
|
"description": "The directory containing metadata that will be deployed on the build org prior to attempting conversion.",
|
|
2940
2940
|
"multiple": false,
|
|
2941
2941
|
"deprecateAliases": true
|
|
2942
|
+
},
|
|
2943
|
+
"verbose": {
|
|
2944
|
+
"name": "verbose",
|
|
2945
|
+
"type": "boolean",
|
|
2946
|
+
"summary": "Display verbose command output.",
|
|
2947
|
+
"allowNo": false,
|
|
2948
|
+
"deprecateAliases": true
|
|
2942
2949
|
}
|
|
2943
2950
|
},
|
|
2944
2951
|
"args": {},
|
|
@@ -6059,62 +6066,38 @@
|
|
|
6059
6066
|
"requiresProject": true
|
|
6060
6067
|
},
|
|
6061
6068
|
"scanner:run": {
|
|
6062
|
-
"id": "scanner:run",
|
|
6063
|
-
"description": "scan a codebase with a selection of rules",
|
|
6064
|
-
"usage": "<%= command.id %> -t <array> [-c <array>] [-f csv|html|json|junit|sarif|table|xml] [-o <string>] [-s <integer> | --json] [--normalize-severity] [-p <array>] [-r <array>] [-e <array>] [--tsconfig <string>] [--eslintconfig <string>] [--pmdconfig <string>] [--env <string>] [--verbose-violations] [--verbose] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
6065
|
-
"pluginName": "@salesforce/sfdx-scanner",
|
|
6066
|
-
"pluginType": "jit",
|
|
6067
6069
|
"aliases": [],
|
|
6070
|
+
"args": {},
|
|
6071
|
+
"description": "scan a codebase with a selection of rules",
|
|
6068
6072
|
"examples": [
|
|
6069
6073
|
"This example evaluates all rules against somefile.js.\nInvoking code analyzer without specifying any rules causes all rules to be run.\n\t$ sfdx scanner:run --format xml --target \"somefile.js\"\n\nThis example evaluates all rules in the Design and Best Practices categories.\nWhen you specify multiple categories or rulesets, the results are combined with a logical OR.\n\t$ sfdx scanner:run --format xml --target \"somefile.js\" --\n\nThis example evaluates all rules except those in the Design or Best Practices categories.\nExclude categories by specifying the negation operator and enclosing the values in single quotes.\n\t$ sfdx scanner:run --format xml --target \"somefile.js\" --category '!Design,!Best Practices'\n\nWrap globs in quotes. These examples evaluate rules against all .js files in the current directory, except for IgnoreMe.js.\nUnix example:\n\t$ sfdx scanner:run --target './**/*.js,!./**/IgnoreMe.js' ...\nWindows example:\n\t$ sfdx scanner:run --target \".\\**\\*.js,!.\\**\\IgnoreMe.js\" ...\n\nThis example scans the project contained in '/my-project' if the current working directory is another directory.\nSpecify tsconfig.json if the current working directory does not contain the tsconfig.json that corresponds to the TypeScript files being scanned.\n\t$ sfdx scanner:run --target \"/my-project/**/*.ts\" --tsconfig \"/my-project/tsconfig.json\"\n\nThis example evaluates rules against somefile.js, including Jasmine in the environment variables.\nUses --env to override the default ESLint environment variables to add frameworks.\n\t$ sfdx scanner:run --target \"somefile.js\" --env '{\"jasmine\": true}'\n\nThis example evaluates rules aginst somefile.js using eslint-lwc and pmd engines.\nUse --engine to include or exclude engines. Any engine listed will be run, regardless of its current 'disabled' attribute.\n\t$ sfdx scanner:run --target \"somefile.js\" --engine \"eslint-lwc,pmd\"\n\nThis example executes CPD engine against known file extensions in \"/some/dir\". CPD helps detect blocks of code duplication in selected languages.\nUse --engine to invoke engines that are not enabled by default.\n\t$ sfdx scanner:run --target \"/some/dir\" --engine cpd\n\nThis example executes rules defined in pmd_rule_ref.xml against the files in 'src'.\nTo use PMD with your own rule reference file, use --pmdconfig. Note that rule filters are not applied.\n\t$ sfdx scanner:run --target \"src\" --pmdconfig \"pmd_rule_ref.xml\"\n\nThis example uses a custom config to scan the files in 'src'.\nTo use ESLint with your own .eslintrc.json file, use --eslintconfig. Make sure that the directory you run the command from has all the NPM dependencies installed.\n\t$ sfdx scanner:run --target \"src\" --eslintconfig \"/home/my/setup/.eslintrc.json\"\n\nThis example uses --normalize-severity to output normalized severity and engine-specific severity across all engines. Normalized severity is: 1 (high), 2 (moderate), and 3 (low).\n\t$ sfdx scanner:run --target \"/some-project/\" --format csv --normalize-severity\n\nThis example uses --severity-threshold to throw a non-zero exit code when rule violations of normalized severity 2 or greater are found. If any violations with the specified severity (or greater) are found, the exit code equals the severity of the most severe violation.\n\t$ sfdx scanner:run --target \"/some-project/\" --severity-threshold 2\n\nThe paths specified for --projectdir must contain all files specified through --target cumulatively.\n\t$ sfdx scanner:run --target \"./myproject/main/default/classes/*.cls\" --projectdir \"./myproject/\"\n\t$ sfdx scanner:run --target \"./**/*.cls\" --projectdir \"./\"\n\t$ sfdx scanner:run --target \"./dir1/file1.cls,./dir2/file2.cls\" --projectdir \"./dir1/,./dir2/\"\n\nThis example fails because the set of files included in --target is larger than that contained in --projectdir:\n\t$ sfdx scanner:run --target \"./**/*.cls\" --projectdir \"./myproject/\"\n"
|
|
6070
6074
|
],
|
|
6071
|
-
"flags": {
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
"name": "loglevel",
|
|
6080
|
-
"type": "option",
|
|
6081
|
-
"description": "logging level for this command invocation",
|
|
6082
|
-
"required": false,
|
|
6083
|
-
"helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
|
|
6084
|
-
"options": [
|
|
6085
|
-
"trace",
|
|
6086
|
-
"debug",
|
|
6087
|
-
"info",
|
|
6088
|
-
"warn",
|
|
6089
|
-
"error",
|
|
6090
|
-
"fatal",
|
|
6091
|
-
"TRACE",
|
|
6092
|
-
"DEBUG",
|
|
6093
|
-
"INFO",
|
|
6094
|
-
"WARN",
|
|
6095
|
-
"ERROR",
|
|
6096
|
-
"FATAL"
|
|
6097
|
-
],
|
|
6098
|
-
"default": "warn"
|
|
6099
|
-
},
|
|
6075
|
+
"flags": {},
|
|
6076
|
+
"hasDynamicHelp": false,
|
|
6077
|
+
"hiddenAliases": [],
|
|
6078
|
+
"id": "scanner:run",
|
|
6079
|
+
"pluginAlias": "@salesforce/sfdx-scanner",
|
|
6080
|
+
"pluginName": "@salesforce/sfdx-scanner",
|
|
6081
|
+
"pluginType": "jit",
|
|
6082
|
+
"flagsConfig": {
|
|
6100
6083
|
"verbose": {
|
|
6101
|
-
"
|
|
6102
|
-
"type": "boolean",
|
|
6103
|
-
"description": "emit additional command output to stdout",
|
|
6104
|
-
"allowNo": false
|
|
6084
|
+
"type": "builtin"
|
|
6105
6085
|
},
|
|
6106
6086
|
"category": {
|
|
6107
|
-
"
|
|
6108
|
-
"type": "option",
|
|
6087
|
+
"kind": "array",
|
|
6109
6088
|
"char": "c",
|
|
6110
|
-
"description": "one or more categories of rules to run"
|
|
6089
|
+
"description": "one or more categories of rules to run",
|
|
6090
|
+
"longDescription": "One or more categories of rules to run. Specify multiple values as a comma-separated list.",
|
|
6091
|
+
"input": [],
|
|
6092
|
+
"multiple": false,
|
|
6093
|
+
"type": "option"
|
|
6111
6094
|
},
|
|
6112
6095
|
"format": {
|
|
6113
|
-
"
|
|
6114
|
-
"
|
|
6096
|
+
"kind": "enum",
|
|
6097
|
+
"helpValue": "(csv|html|json|junit|sarif|table|xml)",
|
|
6115
6098
|
"char": "f",
|
|
6116
6099
|
"description": "specify results output format",
|
|
6117
|
-
"
|
|
6100
|
+
"longDescription": "Specifies results output format written directly to the console.",
|
|
6118
6101
|
"options": [
|
|
6119
6102
|
"csv",
|
|
6120
6103
|
"html",
|
|
@@ -6123,107 +6106,160 @@
|
|
|
6123
6106
|
"sarif",
|
|
6124
6107
|
"table",
|
|
6125
6108
|
"xml"
|
|
6126
|
-
]
|
|
6109
|
+
],
|
|
6110
|
+
"input": [],
|
|
6111
|
+
"multiple": false,
|
|
6112
|
+
"type": "option"
|
|
6127
6113
|
},
|
|
6128
6114
|
"outfile": {
|
|
6129
|
-
"
|
|
6130
|
-
"type": "option",
|
|
6115
|
+
"kind": "string",
|
|
6131
6116
|
"char": "o",
|
|
6132
|
-
"description": "write output to a file"
|
|
6117
|
+
"description": "write output to a file",
|
|
6118
|
+
"longDescription": "Writes output to a file.",
|
|
6119
|
+
"input": [],
|
|
6120
|
+
"multiple": false,
|
|
6121
|
+
"type": "option"
|
|
6133
6122
|
},
|
|
6134
6123
|
"severity-threshold": {
|
|
6135
|
-
"
|
|
6136
|
-
"type": "option",
|
|
6124
|
+
"kind": "integer",
|
|
6137
6125
|
"char": "s",
|
|
6138
|
-
"description": "throw an error when a violation threshold is reached, the --normalize-severity is invoked, and severity levels are reset to the baseline"
|
|
6126
|
+
"description": "throw an error when a violation threshold is reached, the --normalize-severity is invoked, and severity levels are reset to the baseline",
|
|
6127
|
+
"longDescription": "Throws an error when violations are found with equal or greater severity than the provided value. Values are 1 (high), 2 (moderate), and 3 (low). Exit code is the most severe violation. Using this flag also invokes the --normalize-severity flag.",
|
|
6128
|
+
"exclusive": [
|
|
6129
|
+
"json"
|
|
6130
|
+
],
|
|
6131
|
+
"min": 1,
|
|
6132
|
+
"max": 3,
|
|
6133
|
+
"input": [],
|
|
6134
|
+
"multiple": false,
|
|
6135
|
+
"type": "option"
|
|
6139
6136
|
},
|
|
6140
6137
|
"normalize-severity": {
|
|
6141
|
-
"
|
|
6142
|
-
"type": "boolean",
|
|
6138
|
+
"kind": "boolean",
|
|
6143
6139
|
"description": "return normalized severity 1 (high), 2 (moderate), and 3 (low), and the engine-specific severity",
|
|
6144
|
-
"
|
|
6140
|
+
"longDescription": "Returns normalized severity 1 (high), 2 (moderate), and 3 (low), and the engine-specific severity. For the html option, the normalized severity is displayed instead of the engine severity.",
|
|
6141
|
+
"allowNo": false,
|
|
6142
|
+
"type": "boolean"
|
|
6145
6143
|
},
|
|
6146
6144
|
"projectdir": {
|
|
6147
|
-
"
|
|
6148
|
-
"type": "option",
|
|
6145
|
+
"kind": "array",
|
|
6149
6146
|
"char": "p",
|
|
6150
|
-
"description": "provide root directory of project"
|
|
6147
|
+
"description": "provide root directory of project",
|
|
6148
|
+
"longDescription": "Provides the relative or absolute root project directory used to set the context for Graph Engine's analysis. Project directory must be a path, not a glob. Specify multiple values as a comma-separated list.",
|
|
6149
|
+
"input": [],
|
|
6150
|
+
"multiple": false,
|
|
6151
|
+
"type": "option"
|
|
6151
6152
|
},
|
|
6152
6153
|
"ruleset": {
|
|
6153
|
-
"
|
|
6154
|
-
"type": "option",
|
|
6154
|
+
"kind": "array",
|
|
6155
6155
|
"char": "r",
|
|
6156
|
-
"
|
|
6156
|
+
"deprecated": {
|
|
6157
|
+
"messageOverride": "The 'ruleset' command parameter is deprecated. Use 'category' instead."
|
|
6158
|
+
},
|
|
6159
|
+
"description": "[deprecated] rulesets to run",
|
|
6160
|
+
"longDescription": "[deprecated] One or more rulesets to run. Specify multiple values as a comma-separated list.",
|
|
6161
|
+
"input": [],
|
|
6162
|
+
"multiple": false,
|
|
6163
|
+
"type": "option"
|
|
6157
6164
|
},
|
|
6158
6165
|
"engine": {
|
|
6159
|
-
"
|
|
6160
|
-
"type": "option",
|
|
6166
|
+
"kind": "array",
|
|
6161
6167
|
"char": "e",
|
|
6162
|
-
"description": "specify which engines to run"
|
|
6168
|
+
"description": "specify which engines to run",
|
|
6169
|
+
"longDescription": "Specifies one or more engines to run. Submit multiple values as a comma-separated list.",
|
|
6170
|
+
"input": [],
|
|
6171
|
+
"multiple": false,
|
|
6172
|
+
"type": "option"
|
|
6163
6173
|
},
|
|
6164
6174
|
"target": {
|
|
6165
|
-
"
|
|
6166
|
-
"type": "option",
|
|
6175
|
+
"kind": "array",
|
|
6167
6176
|
"char": "t",
|
|
6168
6177
|
"description": "source code location",
|
|
6169
|
-
"
|
|
6178
|
+
"longDescription": "Source code location. May use glob patterns. Specify multiple values as a comma-separated list.",
|
|
6179
|
+
"required": true,
|
|
6180
|
+
"input": [],
|
|
6181
|
+
"multiple": false,
|
|
6182
|
+
"type": "option"
|
|
6170
6183
|
},
|
|
6171
6184
|
"tsconfig": {
|
|
6172
|
-
"
|
|
6173
|
-
"
|
|
6174
|
-
"
|
|
6185
|
+
"kind": "string",
|
|
6186
|
+
"description": "location of tsconfig.json file",
|
|
6187
|
+
"longDescription": "Location of tsconfig.json file used by eslint-typescript engine.",
|
|
6188
|
+
"input": [],
|
|
6189
|
+
"multiple": false,
|
|
6190
|
+
"type": "option"
|
|
6175
6191
|
},
|
|
6176
6192
|
"eslintconfig": {
|
|
6177
|
-
"
|
|
6178
|
-
"
|
|
6179
|
-
"
|
|
6193
|
+
"kind": "string",
|
|
6194
|
+
"description": "specify the location of eslintrc config to customize eslint engine",
|
|
6195
|
+
"longDescription": "Specifies the location of eslintrc config to customize eslint engine.",
|
|
6196
|
+
"input": [],
|
|
6197
|
+
"multiple": false,
|
|
6198
|
+
"type": "option"
|
|
6180
6199
|
},
|
|
6181
6200
|
"pmdconfig": {
|
|
6182
|
-
"
|
|
6183
|
-
"
|
|
6184
|
-
"
|
|
6201
|
+
"kind": "string",
|
|
6202
|
+
"description": "specify location of PMD rule reference XML file to customize rule selection",
|
|
6203
|
+
"longDescription": "Specifies the location of PMD rule reference XML file to customize rule selection.",
|
|
6204
|
+
"input": [],
|
|
6205
|
+
"multiple": false,
|
|
6206
|
+
"type": "option"
|
|
6185
6207
|
},
|
|
6186
6208
|
"env": {
|
|
6187
|
-
"
|
|
6188
|
-
"
|
|
6189
|
-
"
|
|
6209
|
+
"kind": "string",
|
|
6210
|
+
"description": "[deprecated] override ESLint's default environment variables, in JSON-formatted string",
|
|
6211
|
+
"longDescription": "[deprecated] Overrides ESLint's default environmental variables, in JSON-formatted string.",
|
|
6212
|
+
"deprecated": {
|
|
6213
|
+
"messageOverride": "--env parameter is being deprecated, and will be removed in a future release."
|
|
6214
|
+
},
|
|
6215
|
+
"input": [],
|
|
6216
|
+
"multiple": false,
|
|
6217
|
+
"type": "option"
|
|
6190
6218
|
},
|
|
6191
6219
|
"verbose-violations": {
|
|
6192
|
-
"
|
|
6193
|
-
"type": "boolean",
|
|
6220
|
+
"kind": "boolean",
|
|
6194
6221
|
"description": "return retire-js violation message details",
|
|
6195
|
-
"
|
|
6222
|
+
"longDescription": "Returns retire-js violation messages details about each vulnerability, including summary, Common Vulnerabilities and Exposures (CVE), and URLs.",
|
|
6223
|
+
"allowNo": false,
|
|
6224
|
+
"type": "boolean"
|
|
6196
6225
|
}
|
|
6197
6226
|
},
|
|
6198
|
-
"
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6227
|
+
"longDescription": "Scans a codebase with a selection of rules. You can scan the codebase with all the rules in the registry, or use parameters to filter the rules based on rulename, category, or ruleset. You can specify the format of the output, such as XML or JUnit. You can print the output to the console (default) or to a file using the --outfile parameter.",
|
|
6228
|
+
"isESM": false,
|
|
6229
|
+
"relativePath": [
|
|
6230
|
+
"lib",
|
|
6231
|
+
"commands",
|
|
6232
|
+
"scanner",
|
|
6233
|
+
"run.js"
|
|
6234
|
+
],
|
|
6235
|
+
"aliasPermutations": [],
|
|
6236
|
+
"permutations": [
|
|
6237
|
+
"scanner:run",
|
|
6238
|
+
"run:scanner"
|
|
6202
6239
|
]
|
|
6203
6240
|
},
|
|
6204
6241
|
"scanner:rule:add": {
|
|
6205
|
-
"id": "scanner:rule:add",
|
|
6206
|
-
"description": "add custom rules to Salesforce Code Analyzer's registry",
|
|
6207
|
-
"usage": "<%= command.id %> -l <string> -p <array> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
6208
|
-
"pluginName": "@salesforce/sfdx-scanner",
|
|
6209
|
-
"pluginType": "jit",
|
|
6210
6242
|
"aliases": [],
|
|
6243
|
+
"args": {},
|
|
6244
|
+
"description": "add custom rules to Salesforce Code Analyzer's registry",
|
|
6211
6245
|
"examples": [
|
|
6212
6246
|
"Bundle custom PMD rules in JAR files. Follow PMD conventions, such as defining the custom rules in XML files under a `/category/` directory.\nSee PMD's documentation for more information on writing rules.\n\nThis example shows how to specify two JAR files directly.\n\t$ sfdx scanner:rule:add --language apex --path \"/Users/me/rules/Jar1.jar,/Users/me/rules/Jar2.jar\"\n\t\tSuccessfully added rules for apex.\n\t\t2 path(s) added:\n\t\t/Users/me/rules/Jar1.jar,/Users/me/rules/Jar2.jar\n\nThis example shows how to specify a directory containing one or more JARs, all of which are added to the registry.\n\t$ sfdx scanner:rule:add --language apex --path \"/Users/me/rules\"\n\t\tSuccessfully added rules for apex."
|
|
6213
6247
|
],
|
|
6214
6248
|
"flags": {
|
|
6215
6249
|
"json": {
|
|
6216
|
-
"name": "json",
|
|
6217
|
-
"type": "boolean",
|
|
6218
6250
|
"description": "format output as json",
|
|
6219
|
-
"
|
|
6251
|
+
"name": "json",
|
|
6252
|
+
"allowNo": false,
|
|
6253
|
+
"type": "boolean"
|
|
6220
6254
|
},
|
|
6221
6255
|
"loglevel": {
|
|
6222
|
-
"name": "loglevel",
|
|
6223
|
-
"type": "option",
|
|
6224
6256
|
"description": "logging level for this command invocation",
|
|
6257
|
+
"name": "loglevel",
|
|
6225
6258
|
"required": false,
|
|
6259
|
+
"default": "warn",
|
|
6260
|
+
"hasDynamicHelp": false,
|
|
6226
6261
|
"helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
|
|
6262
|
+
"multiple": false,
|
|
6227
6263
|
"options": [
|
|
6228
6264
|
"trace",
|
|
6229
6265
|
"debug",
|
|
@@ -6238,48 +6274,98 @@
|
|
|
6238
6274
|
"ERROR",
|
|
6239
6275
|
"FATAL"
|
|
6240
6276
|
],
|
|
6241
|
-
"
|
|
6277
|
+
"type": "option"
|
|
6242
6278
|
},
|
|
6243
6279
|
"language": {
|
|
6244
|
-
"name": "language",
|
|
6245
|
-
"type": "option",
|
|
6246
6280
|
"char": "l",
|
|
6247
6281
|
"description": "language that the custom rules are evaluated against",
|
|
6248
|
-
"
|
|
6282
|
+
"name": "language",
|
|
6283
|
+
"required": true,
|
|
6284
|
+
"hasDynamicHelp": false,
|
|
6285
|
+
"multiple": false,
|
|
6286
|
+
"type": "option"
|
|
6249
6287
|
},
|
|
6250
6288
|
"path": {
|
|
6289
|
+
"char": "p",
|
|
6290
|
+
"description": "one or more paths (such as a directory or JAR file) to custom rule definitions",
|
|
6251
6291
|
"name": "path",
|
|
6252
|
-
"
|
|
6292
|
+
"required": true,
|
|
6293
|
+
"hasDynamicHelp": false,
|
|
6294
|
+
"multiple": false,
|
|
6295
|
+
"type": "option"
|
|
6296
|
+
}
|
|
6297
|
+
},
|
|
6298
|
+
"hasDynamicHelp": false,
|
|
6299
|
+
"hiddenAliases": [],
|
|
6300
|
+
"id": "scanner:rule:add",
|
|
6301
|
+
"pluginAlias": "@salesforce/sfdx-scanner",
|
|
6302
|
+
"pluginName": "@salesforce/sfdx-scanner",
|
|
6303
|
+
"pluginType": "jit",
|
|
6304
|
+
"strict": true,
|
|
6305
|
+
"usage": "<%= command.id %> -l <string> -p <array> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
6306
|
+
"longDescription": "Adds custom rules to Salesforce Code Analyzer's registry so that you can run them along with the built-in rules. Compile and test custom rules separately before adding them.",
|
|
6307
|
+
"flagsConfig": {
|
|
6308
|
+
"language": {
|
|
6309
|
+
"kind": "string",
|
|
6310
|
+
"char": "l",
|
|
6311
|
+
"description": "language that the custom rules are evaluated against",
|
|
6312
|
+
"longDescription": "Language that the custom rules are evaluated against.",
|
|
6313
|
+
"required": true,
|
|
6314
|
+
"input": [],
|
|
6315
|
+
"multiple": false,
|
|
6316
|
+
"type": "option"
|
|
6317
|
+
},
|
|
6318
|
+
"path": {
|
|
6319
|
+
"kind": "array",
|
|
6253
6320
|
"char": "p",
|
|
6254
6321
|
"description": "one or more paths (such as a directory or JAR file) to custom rule definitions",
|
|
6255
|
-
"
|
|
6322
|
+
"longDescription": "One or more paths (such as a directory or JAR file) to custom rule definitions. Specify multiple values as a comma-separated list.",
|
|
6323
|
+
"required": true,
|
|
6324
|
+
"input": [],
|
|
6325
|
+
"multiple": false,
|
|
6326
|
+
"type": "option"
|
|
6256
6327
|
}
|
|
6257
6328
|
},
|
|
6258
|
-
"
|
|
6329
|
+
"isESM": false,
|
|
6330
|
+
"relativePath": [
|
|
6331
|
+
"lib",
|
|
6332
|
+
"commands",
|
|
6333
|
+
"scanner",
|
|
6334
|
+
"rule",
|
|
6335
|
+
"add.js"
|
|
6336
|
+
],
|
|
6337
|
+
"aliasPermutations": [],
|
|
6338
|
+
"permutations": [
|
|
6339
|
+
"scanner:rule:add",
|
|
6340
|
+
"rule:scanner:add",
|
|
6341
|
+
"rule:add:scanner",
|
|
6342
|
+
"scanner:add:rule",
|
|
6343
|
+
"add:scanner:rule",
|
|
6344
|
+
"add:rule:scanner"
|
|
6345
|
+
]
|
|
6259
6346
|
},
|
|
6260
6347
|
"scanner:rule:describe": {
|
|
6261
|
-
"id": "scanner:rule:describe",
|
|
6262
|
-
"description": "provide detailed information about a rule",
|
|
6263
|
-
"usage": "<%= command.id %> -n <string> [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
6264
|
-
"pluginName": "@salesforce/sfdx-scanner",
|
|
6265
|
-
"pluginType": "jit",
|
|
6266
6348
|
"aliases": [],
|
|
6349
|
+
"args": {},
|
|
6350
|
+
"description": "provide detailed information about a rule",
|
|
6267
6351
|
"examples": [
|
|
6268
6352
|
"$ sfdx scanner:rule:describe --rulename ExampleRule\n\tname: AvoidWithStatement\n\tcategories: Best Practices\n\trulesets: Controversial Ecmascript\n\tlanguages: javascript\n\tdescription: Avoid using with - it's bad news\n\tmessage: Avoid using with - it's bad news\n\t"
|
|
6269
6353
|
],
|
|
6270
6354
|
"flags": {
|
|
6271
6355
|
"json": {
|
|
6272
|
-
"name": "json",
|
|
6273
|
-
"type": "boolean",
|
|
6274
6356
|
"description": "format output as json",
|
|
6275
|
-
"
|
|
6357
|
+
"name": "json",
|
|
6358
|
+
"allowNo": false,
|
|
6359
|
+
"type": "boolean"
|
|
6276
6360
|
},
|
|
6277
6361
|
"loglevel": {
|
|
6278
|
-
"name": "loglevel",
|
|
6279
|
-
"type": "option",
|
|
6280
6362
|
"description": "logging level for this command invocation",
|
|
6363
|
+
"name": "loglevel",
|
|
6281
6364
|
"required": false,
|
|
6365
|
+
"default": "warn",
|
|
6366
|
+
"hasDynamicHelp": false,
|
|
6282
6367
|
"helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
|
|
6368
|
+
"multiple": false,
|
|
6283
6369
|
"options": [
|
|
6284
6370
|
"trace",
|
|
6285
6371
|
"debug",
|
|
@@ -6294,51 +6380,92 @@
|
|
|
6294
6380
|
"ERROR",
|
|
6295
6381
|
"FATAL"
|
|
6296
6382
|
],
|
|
6297
|
-
"
|
|
6383
|
+
"type": "option"
|
|
6298
6384
|
},
|
|
6299
6385
|
"rulename": {
|
|
6300
|
-
"name": "rulename",
|
|
6301
|
-
"type": "option",
|
|
6302
6386
|
"char": "n",
|
|
6303
6387
|
"description": "the name of the rule",
|
|
6304
|
-
"
|
|
6388
|
+
"name": "rulename",
|
|
6389
|
+
"required": true,
|
|
6390
|
+
"hasDynamicHelp": false,
|
|
6391
|
+
"multiple": false,
|
|
6392
|
+
"type": "option"
|
|
6305
6393
|
},
|
|
6306
6394
|
"verbose": {
|
|
6395
|
+
"description": "emit additional command output to stdout",
|
|
6307
6396
|
"name": "verbose",
|
|
6397
|
+
"allowNo": false,
|
|
6398
|
+
"type": "boolean"
|
|
6399
|
+
}
|
|
6400
|
+
},
|
|
6401
|
+
"hasDynamicHelp": false,
|
|
6402
|
+
"hiddenAliases": [],
|
|
6403
|
+
"id": "scanner:rule:describe",
|
|
6404
|
+
"pluginAlias": "@salesforce/sfdx-scanner",
|
|
6405
|
+
"pluginName": "@salesforce/sfdx-scanner",
|
|
6406
|
+
"pluginType": "jit",
|
|
6407
|
+
"strict": true,
|
|
6408
|
+
"usage": "<%= command.id %> -n <string> [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
6409
|
+
"longDescription": "Provides detailed information about a rule. Information includes the rule's language (such as Apex or Java), the violation it detects, and example code of the violation. The command output also includes the rule's categories and rulesets.",
|
|
6410
|
+
"flagsConfig": {
|
|
6411
|
+
"rulename": {
|
|
6412
|
+
"kind": "string",
|
|
6413
|
+
"char": "n",
|
|
6414
|
+
"description": "the name of the rule",
|
|
6415
|
+
"longDescription": "The name of the rule.",
|
|
6416
|
+
"required": true,
|
|
6417
|
+
"input": [],
|
|
6418
|
+
"multiple": false,
|
|
6419
|
+
"type": "option"
|
|
6420
|
+
},
|
|
6421
|
+
"verbose": {
|
|
6308
6422
|
"type": "boolean",
|
|
6423
|
+
"kind": "boolean",
|
|
6309
6424
|
"description": "emit additional command output to stdout",
|
|
6425
|
+
"longDescription": "Emit additional command output to stdout.",
|
|
6310
6426
|
"allowNo": false
|
|
6311
6427
|
}
|
|
6312
6428
|
},
|
|
6313
|
-
"
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6429
|
+
"isESM": false,
|
|
6430
|
+
"relativePath": [
|
|
6431
|
+
"lib",
|
|
6432
|
+
"commands",
|
|
6433
|
+
"scanner",
|
|
6434
|
+
"rule",
|
|
6435
|
+
"describe.js"
|
|
6436
|
+
],
|
|
6437
|
+
"aliasPermutations": [],
|
|
6438
|
+
"permutations": [
|
|
6439
|
+
"scanner:rule:describe",
|
|
6440
|
+
"rule:scanner:describe",
|
|
6441
|
+
"rule:describe:scanner",
|
|
6442
|
+
"scanner:describe:rule",
|
|
6443
|
+
"describe:scanner:rule",
|
|
6444
|
+
"describe:rule:scanner"
|
|
6317
6445
|
]
|
|
6318
6446
|
},
|
|
6319
6447
|
"scanner:rule:list": {
|
|
6320
|
-
"id": "scanner:rule:list",
|
|
6321
|
-
"description": "list basic information about all rules matching provided criteria",
|
|
6322
|
-
"usage": "<%= command.id %> [-c <array>] [-r <array>] [-l <array>] [-e <array>] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
6323
|
-
"pluginName": "@salesforce/sfdx-scanner",
|
|
6324
|
-
"pluginType": "jit",
|
|
6325
6448
|
"aliases": [],
|
|
6449
|
+
"args": {},
|
|
6450
|
+
"description": "list basic information about all rules matching provided criteria",
|
|
6326
6451
|
"examples": [
|
|
6327
6452
|
"\nThis example invokes the command without filter criteria, which returns all rules.\n\t$ sfdx scanner:rule:list\n\nThis example returns all rules for Apex OR Javascript. Values supplied to a single filter are handled with a logical OR.\n\t$ sfdx scanner:rule:list --language apex,javascript\n\nThis example returns all rules except those in the Design or Best Practices categories. Exclude categories by specifying the negation operator and enclosing the values in single quotes.\n\t$ sfdx scanner:rule:list --category '!Design,!Best Practices'\n\nThis example returns all rules that target Apex OR Javascript, AND are members of the Braces OR Security rulesets.\nThe different filters are combined with a logical AND.\n\t$ sfdx scanner:rule:list --language apex,javascript --ruleset Braces,Security\n"
|
|
6328
6453
|
],
|
|
6329
6454
|
"flags": {
|
|
6330
6455
|
"json": {
|
|
6331
|
-
"name": "json",
|
|
6332
|
-
"type": "boolean",
|
|
6333
6456
|
"description": "format output as json",
|
|
6334
|
-
"
|
|
6457
|
+
"name": "json",
|
|
6458
|
+
"allowNo": false,
|
|
6459
|
+
"type": "boolean"
|
|
6335
6460
|
},
|
|
6336
6461
|
"loglevel": {
|
|
6337
|
-
"name": "loglevel",
|
|
6338
|
-
"type": "option",
|
|
6339
6462
|
"description": "logging level for this command invocation",
|
|
6463
|
+
"name": "loglevel",
|
|
6340
6464
|
"required": false,
|
|
6465
|
+
"default": "warn",
|
|
6466
|
+
"hasDynamicHelp": false,
|
|
6341
6467
|
"helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
|
|
6468
|
+
"multiple": false,
|
|
6342
6469
|
"options": [
|
|
6343
6470
|
"trace",
|
|
6344
6471
|
"debug",
|
|
@@ -6353,68 +6480,147 @@
|
|
|
6353
6480
|
"ERROR",
|
|
6354
6481
|
"FATAL"
|
|
6355
6482
|
],
|
|
6356
|
-
"
|
|
6483
|
+
"type": "option"
|
|
6357
6484
|
},
|
|
6358
6485
|
"verbose": {
|
|
6486
|
+
"description": "emit additional command output to stdout",
|
|
6359
6487
|
"name": "verbose",
|
|
6488
|
+
"allowNo": false,
|
|
6489
|
+
"type": "boolean"
|
|
6490
|
+
},
|
|
6491
|
+
"category": {
|
|
6492
|
+
"char": "c",
|
|
6493
|
+
"description": "select rules by category",
|
|
6494
|
+
"name": "category",
|
|
6495
|
+
"hasDynamicHelp": false,
|
|
6496
|
+
"multiple": false,
|
|
6497
|
+
"type": "option"
|
|
6498
|
+
},
|
|
6499
|
+
"ruleset": {
|
|
6500
|
+
"char": "r",
|
|
6501
|
+
"deprecated": {
|
|
6502
|
+
"messageOverride": "The 'ruleset' command parameter is deprecated. Use 'category' instead"
|
|
6503
|
+
},
|
|
6504
|
+
"description": "[deprecated] select rules by ruleset",
|
|
6505
|
+
"name": "ruleset",
|
|
6506
|
+
"hasDynamicHelp": false,
|
|
6507
|
+
"multiple": false,
|
|
6508
|
+
"type": "option"
|
|
6509
|
+
},
|
|
6510
|
+
"language": {
|
|
6511
|
+
"char": "l",
|
|
6512
|
+
"description": "select rules by language",
|
|
6513
|
+
"name": "language",
|
|
6514
|
+
"hasDynamicHelp": false,
|
|
6515
|
+
"multiple": false,
|
|
6516
|
+
"type": "option"
|
|
6517
|
+
},
|
|
6518
|
+
"engine": {
|
|
6519
|
+
"char": "e",
|
|
6520
|
+
"description": "select rules by engine",
|
|
6521
|
+
"name": "engine",
|
|
6522
|
+
"hasDynamicHelp": false,
|
|
6523
|
+
"multiple": false,
|
|
6524
|
+
"type": "option"
|
|
6525
|
+
}
|
|
6526
|
+
},
|
|
6527
|
+
"hasDynamicHelp": false,
|
|
6528
|
+
"hiddenAliases": [],
|
|
6529
|
+
"id": "scanner:rule:list",
|
|
6530
|
+
"pluginAlias": "@salesforce/sfdx-scanner",
|
|
6531
|
+
"pluginName": "@salesforce/sfdx-scanner",
|
|
6532
|
+
"pluginType": "jit",
|
|
6533
|
+
"strict": true,
|
|
6534
|
+
"usage": "<%= command.id %> [-c <array>] [-r <array>] [-l <array>] [-e <array>] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
6535
|
+
"longDescription": "Lists all the rules available in the catalog. You can filter the output to view a smaller set of rules. To get more information about a specific rule, use the `scanner:rule:describe` command.",
|
|
6536
|
+
"flagsConfig": {
|
|
6537
|
+
"verbose": {
|
|
6360
6538
|
"type": "boolean",
|
|
6539
|
+
"kind": "boolean",
|
|
6361
6540
|
"description": "emit additional command output to stdout",
|
|
6541
|
+
"longDescription": "Emit additional command output to stdout.",
|
|
6362
6542
|
"allowNo": false
|
|
6363
6543
|
},
|
|
6364
6544
|
"category": {
|
|
6365
|
-
"
|
|
6366
|
-
"type": "option",
|
|
6545
|
+
"kind": "array",
|
|
6367
6546
|
"char": "c",
|
|
6368
|
-
"description": "select rules by category"
|
|
6547
|
+
"description": "select rules by category",
|
|
6548
|
+
"longDescription": "Selects rules by category. Enter multiple values as a comma-separated list.",
|
|
6549
|
+
"input": [],
|
|
6550
|
+
"multiple": false,
|
|
6551
|
+
"type": "option"
|
|
6369
6552
|
},
|
|
6370
6553
|
"ruleset": {
|
|
6371
|
-
"
|
|
6372
|
-
"type": "option",
|
|
6554
|
+
"kind": "array",
|
|
6373
6555
|
"char": "r",
|
|
6374
|
-
"
|
|
6556
|
+
"deprecated": {
|
|
6557
|
+
"messageOverride": "The 'ruleset' command parameter is deprecated. Use 'category' instead"
|
|
6558
|
+
},
|
|
6559
|
+
"description": "[deprecated] select rules by ruleset",
|
|
6560
|
+
"longDescription": "[deprecated] Selects rules by ruleset. Enter multiple values as a comma-separated list.",
|
|
6561
|
+
"input": [],
|
|
6562
|
+
"multiple": false,
|
|
6563
|
+
"type": "option"
|
|
6375
6564
|
},
|
|
6376
6565
|
"language": {
|
|
6377
|
-
"
|
|
6378
|
-
"type": "option",
|
|
6566
|
+
"kind": "array",
|
|
6379
6567
|
"char": "l",
|
|
6380
|
-
"description": "select rules by language"
|
|
6568
|
+
"description": "select rules by language",
|
|
6569
|
+
"longDescription": "Selects rules by language. Enter multiple values as a comma-separated list.",
|
|
6570
|
+
"input": [],
|
|
6571
|
+
"multiple": false,
|
|
6572
|
+
"type": "option"
|
|
6381
6573
|
},
|
|
6382
6574
|
"engine": {
|
|
6383
|
-
"
|
|
6384
|
-
"type": "option",
|
|
6575
|
+
"kind": "array",
|
|
6385
6576
|
"char": "e",
|
|
6386
|
-
"description": "select rules by engine"
|
|
6577
|
+
"description": "select rules by engine",
|
|
6578
|
+
"longDescription": "Selects rules by engine. Enter multiple engines as a comma-separated list.",
|
|
6579
|
+
"input": [],
|
|
6580
|
+
"multiple": false,
|
|
6581
|
+
"type": "option"
|
|
6387
6582
|
}
|
|
6388
6583
|
},
|
|
6389
|
-
"
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6584
|
+
"isESM": false,
|
|
6585
|
+
"relativePath": [
|
|
6586
|
+
"lib",
|
|
6587
|
+
"commands",
|
|
6588
|
+
"scanner",
|
|
6589
|
+
"rule",
|
|
6590
|
+
"list.js"
|
|
6591
|
+
],
|
|
6592
|
+
"aliasPermutations": [],
|
|
6593
|
+
"permutations": [
|
|
6594
|
+
"scanner:rule:list",
|
|
6595
|
+
"rule:scanner:list",
|
|
6596
|
+
"rule:list:scanner",
|
|
6597
|
+
"scanner:list:rule",
|
|
6598
|
+
"list:scanner:rule",
|
|
6599
|
+
"list:rule:scanner"
|
|
6393
6600
|
]
|
|
6394
6601
|
},
|
|
6395
6602
|
"scanner:rule:remove": {
|
|
6396
|
-
"id": "scanner:rule:remove",
|
|
6397
|
-
"description": "remove custom rules from the registry of available rules",
|
|
6398
|
-
"usage": "<%= command.id %> [-f] [-p <array>] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
6399
|
-
"pluginName": "@salesforce/sfdx-scanner",
|
|
6400
|
-
"pluginType": "jit",
|
|
6401
6603
|
"aliases": [],
|
|
6604
|
+
"args": {},
|
|
6605
|
+
"description": "remove custom rules from the registry of available rules",
|
|
6402
6606
|
"examples": [
|
|
6403
6607
|
"This example runs the command without arguments to see a list of registered custom paths.\n\t$ sfdx scanner:rule:remove\n\nThis example uses the --path parameter to deregister the rules defined in somerules.jar and any JARs/XMLs contained in the rules folder.\n\t$ sfdx scanner:rule:remove --path \"~/path/to/somerules.jar,~/path/to/folder/containing/rules\"\n\nThis example uses the --force flag to bypass the confirmation prompt, removing all rules defined in somerules.jar.\nBy default, a list of all rules that will be unregistered is displayed, and the action must be confirmed. To bypass that confirmation, use the --force flag.\n\t$ sfdx scanner:rule:remove --force --path \"~/path/to/somerules.jar\"\n"
|
|
6404
6608
|
],
|
|
6405
6609
|
"flags": {
|
|
6406
6610
|
"json": {
|
|
6407
|
-
"name": "json",
|
|
6408
|
-
"type": "boolean",
|
|
6409
6611
|
"description": "format output as json",
|
|
6410
|
-
"
|
|
6612
|
+
"name": "json",
|
|
6613
|
+
"allowNo": false,
|
|
6614
|
+
"type": "boolean"
|
|
6411
6615
|
},
|
|
6412
6616
|
"loglevel": {
|
|
6413
|
-
"name": "loglevel",
|
|
6414
|
-
"type": "option",
|
|
6415
6617
|
"description": "logging level for this command invocation",
|
|
6618
|
+
"name": "loglevel",
|
|
6416
6619
|
"required": false,
|
|
6620
|
+
"default": "warn",
|
|
6621
|
+
"hasDynamicHelp": false,
|
|
6417
6622
|
"helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
|
|
6623
|
+
"multiple": false,
|
|
6418
6624
|
"options": [
|
|
6419
6625
|
"trace",
|
|
6420
6626
|
"debug",
|
|
@@ -6429,91 +6635,116 @@
|
|
|
6429
6635
|
"ERROR",
|
|
6430
6636
|
"FATAL"
|
|
6431
6637
|
],
|
|
6432
|
-
"
|
|
6638
|
+
"type": "option"
|
|
6433
6639
|
},
|
|
6434
6640
|
"verbose": {
|
|
6641
|
+
"description": "emit additional command output to stdout",
|
|
6435
6642
|
"name": "verbose",
|
|
6643
|
+
"allowNo": false,
|
|
6644
|
+
"type": "boolean"
|
|
6645
|
+
},
|
|
6646
|
+
"force": {
|
|
6647
|
+
"char": "f",
|
|
6648
|
+
"description": "bypass the confirmation prompt and immediately remove the rules",
|
|
6649
|
+
"name": "force",
|
|
6650
|
+
"allowNo": false,
|
|
6651
|
+
"type": "boolean"
|
|
6652
|
+
},
|
|
6653
|
+
"path": {
|
|
6654
|
+
"char": "p",
|
|
6655
|
+
"description": "one or more paths to remove",
|
|
6656
|
+
"name": "path",
|
|
6657
|
+
"hasDynamicHelp": false,
|
|
6658
|
+
"multiple": false,
|
|
6659
|
+
"type": "option"
|
|
6660
|
+
}
|
|
6661
|
+
},
|
|
6662
|
+
"hasDynamicHelp": false,
|
|
6663
|
+
"hiddenAliases": [],
|
|
6664
|
+
"id": "scanner:rule:remove",
|
|
6665
|
+
"pluginAlias": "@salesforce/sfdx-scanner",
|
|
6666
|
+
"pluginName": "@salesforce/sfdx-scanner",
|
|
6667
|
+
"pluginType": "jit",
|
|
6668
|
+
"strict": true,
|
|
6669
|
+
"usage": "<%= command.id %> [-f] [-p <array>] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
6670
|
+
"longDescription": "Removes custom rules from the registry of available rules. Use the `-p|--path` parameter to specify one or more paths to remove. If you don't specify any parameters, the command lists all valid custom paths but doesn't remove any.",
|
|
6671
|
+
"flagsConfig": {
|
|
6672
|
+
"verbose": {
|
|
6436
6673
|
"type": "boolean",
|
|
6674
|
+
"kind": "boolean",
|
|
6437
6675
|
"description": "emit additional command output to stdout",
|
|
6676
|
+
"longDescription": "Emit additional command output to stdout.",
|
|
6438
6677
|
"allowNo": false
|
|
6439
6678
|
},
|
|
6440
6679
|
"force": {
|
|
6441
|
-
"
|
|
6442
|
-
"type": "boolean",
|
|
6680
|
+
"kind": "boolean",
|
|
6443
6681
|
"char": "f",
|
|
6444
6682
|
"description": "bypass the confirmation prompt and immediately remove the rules",
|
|
6445
|
-
"
|
|
6683
|
+
"longDescription": "Bypasses the confirmation prompt and immediately removes the rules.",
|
|
6684
|
+
"allowNo": false,
|
|
6685
|
+
"type": "boolean"
|
|
6446
6686
|
},
|
|
6447
6687
|
"path": {
|
|
6448
|
-
"
|
|
6449
|
-
"type": "option",
|
|
6688
|
+
"kind": "array",
|
|
6450
6689
|
"char": "p",
|
|
6451
|
-
"description": "one or more paths to remove"
|
|
6690
|
+
"description": "one or more paths to remove",
|
|
6691
|
+
"longDescription": "One or more paths to remove. Specify multiple values with a comma-separated list.",
|
|
6692
|
+
"input": [],
|
|
6693
|
+
"multiple": false,
|
|
6694
|
+
"type": "option"
|
|
6452
6695
|
}
|
|
6453
6696
|
},
|
|
6454
|
-
"
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6697
|
+
"isESM": false,
|
|
6698
|
+
"relativePath": [
|
|
6699
|
+
"lib",
|
|
6700
|
+
"commands",
|
|
6701
|
+
"scanner",
|
|
6702
|
+
"rule",
|
|
6703
|
+
"remove.js"
|
|
6704
|
+
],
|
|
6705
|
+
"aliasPermutations": [],
|
|
6706
|
+
"permutations": [
|
|
6707
|
+
"scanner:rule:remove",
|
|
6708
|
+
"rule:scanner:remove",
|
|
6709
|
+
"rule:remove:scanner",
|
|
6710
|
+
"scanner:remove:rule",
|
|
6711
|
+
"remove:scanner:rule",
|
|
6712
|
+
"remove:rule:scanner"
|
|
6458
6713
|
]
|
|
6459
6714
|
},
|
|
6460
6715
|
"scanner:run:dfa": {
|
|
6461
|
-
"id": "scanner:run:dfa",
|
|
6462
|
-
"description": "scan codebase with all DFA rules",
|
|
6463
|
-
"usage": "<%= command.id %> -t <array> [-c <array>] [-f csv|html|json|junit|sarif|table|xml] [-o <string>] [-s <integer> | --json] [--normalize-severity] [-p <array>] [--with-pilot] [--rule-thread-count <integer>] [--rule-thread-timeout <integer>] [--rule-disable-warning-violation] [--sfgejvmargs <string>] [--pathexplimit <integer>] [--verbose] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
6464
|
-
"pluginName": "@salesforce/sfdx-scanner",
|
|
6465
|
-
"pluginType": "jit",
|
|
6466
6716
|
"aliases": [],
|
|
6717
|
+
"args": {},
|
|
6718
|
+
"description": "scan codebase with all DFA rules",
|
|
6467
6719
|
"examples": [
|
|
6468
6720
|
"The paths specified for --projectdir must contain all files specified through --target cumulatively.\n\t$ sfdx scanner:run:dfa --target \"./myproject/main/default/classes/*.cls\" --projectdir \"./myproject/\"\n\t$ sfdx scanner:run:dfa --target \"./**/*.cls\" --projectdir \"./\"\n\t$ sfdx scanner:run:dfa --target \"./dir1/file1.cls,./dir2/file2.cls\" --projectdir \"./dir1/,./dir2/\"\nThis example fails because the set of files included in --target is larger than that contained in --projectdir:\n\t$ sfdx scanner:run:dfa --target \"./**/*.cls\" --projectdir \"./myproject/\"\nGlobs must be wrapped in quotes, as in these Windows and Unix examples, which evaluate rules against all .cls files in the current directory and subdirectories except for IgnoreMe.cls:\nUnix example:\n\t$ sfdx scanner:run:dfa --target \"./**/*.cls,!./**/IgnoreMe.cls\" ...\nWindows example:\n\t$ sfdx scanner:run:dfa --target \".\\**\\*.cls,!.\\**\\IgnoreMe.cls\" ...\nYou can target individual methods within a file with a suffix hash (#) on the file's path, and with a semi-colon-delimited list of method names. This syntax is incompatible with globs and directories. This example evaluates rules against all methods named Method1 or Method2 in File1.cls, and all methods named Method3 in File2.cls:\n\t$ sfdx scanner:run:dfa --target \"./File1.cls#Method1;Method2,./File2.cls#Method3\" ...\nUse --normalize-severity to output a normalized severity across all engines, in addition to the engine-specific severity. Normalized severity is 1 (high), 2 (moderate), and 3 (low):\n\t$ sfdx scanner:run:dfa --target \"./some-project/\" --projectdir \"./some-project/\" --format csv --normalize-severity\nUse --severity-threshold to throw a non-zero exit code when rule violations of a specific normalized severity or greater are found. If there are any rule violations with a severity of 2 or 1, the exit code is equal to the severity of the most severe violation:\n\t$ sfdx scanner:run:dfa --target \"./some-project/\" --projectdir \"./some-project/\" --severity-threshold 2\nuse --rule-thread-count to allow more (or fewer) entrypoints to be evaluated concurrently:\n\t$ sfdx scanner:run:dfa --rule-thread-count 6 ...\nUse --rule-thread-timeout to increase or decrease the maximum runtime for a single entrypoint evaluation. This increases the timeout from the 15-minute default to 150 minutes:\n\t$ sfdx scanner:run:dfa --rule-thread-timeout 9000000 ...\nUse --sfgejvmargs to pass Java Virtual Machine args to override system defaults while executing Salesforce Graph Engine's rules.\nThe example overrides the system's default heap space allocation to 8 GB and decreases chances of encountering OutOfMemory error.\n\t$ sfdx scanner:run:dfa --sfgejvmargs \"-Xmx8g\" ...\nUse --with-pilot to allow execution of pilot rules:\nThis example allows pilot rules in the \"Performance\" category to execute.\n\t$ sfdx scanner:run:dfa --category 'Performance' --with-pilot ...\n"
|
|
6469
6721
|
],
|
|
6470
|
-
"flags": {
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
"name": "loglevel",
|
|
6479
|
-
"type": "option",
|
|
6480
|
-
"description": "logging level for this command invocation",
|
|
6481
|
-
"required": false,
|
|
6482
|
-
"helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
|
|
6483
|
-
"options": [
|
|
6484
|
-
"trace",
|
|
6485
|
-
"debug",
|
|
6486
|
-
"info",
|
|
6487
|
-
"warn",
|
|
6488
|
-
"error",
|
|
6489
|
-
"fatal",
|
|
6490
|
-
"TRACE",
|
|
6491
|
-
"DEBUG",
|
|
6492
|
-
"INFO",
|
|
6493
|
-
"WARN",
|
|
6494
|
-
"ERROR",
|
|
6495
|
-
"FATAL"
|
|
6496
|
-
],
|
|
6497
|
-
"default": "warn"
|
|
6498
|
-
},
|
|
6722
|
+
"flags": {},
|
|
6723
|
+
"hasDynamicHelp": false,
|
|
6724
|
+
"hiddenAliases": [],
|
|
6725
|
+
"id": "scanner:run:dfa",
|
|
6726
|
+
"pluginAlias": "@salesforce/sfdx-scanner",
|
|
6727
|
+
"pluginName": "@salesforce/sfdx-scanner",
|
|
6728
|
+
"pluginType": "jit",
|
|
6729
|
+
"flagsConfig": {
|
|
6499
6730
|
"verbose": {
|
|
6500
|
-
"
|
|
6501
|
-
"type": "boolean",
|
|
6502
|
-
"description": "emit additional command output to stdout",
|
|
6503
|
-
"allowNo": false
|
|
6731
|
+
"type": "builtin"
|
|
6504
6732
|
},
|
|
6505
6733
|
"category": {
|
|
6506
|
-
"
|
|
6507
|
-
"type": "option",
|
|
6734
|
+
"kind": "array",
|
|
6508
6735
|
"char": "c",
|
|
6509
|
-
"description": "one or more categories of rules to run"
|
|
6736
|
+
"description": "one or more categories of rules to run",
|
|
6737
|
+
"longDescription": "One or more categories of rules to run. Specify multiple values as a comma-separated list.",
|
|
6738
|
+
"input": [],
|
|
6739
|
+
"multiple": false,
|
|
6740
|
+
"type": "option"
|
|
6510
6741
|
},
|
|
6511
6742
|
"format": {
|
|
6512
|
-
"
|
|
6513
|
-
"
|
|
6743
|
+
"kind": "enum",
|
|
6744
|
+
"helpValue": "(csv|html|json|junit|sarif|table|xml)",
|
|
6514
6745
|
"char": "f",
|
|
6515
6746
|
"description": "specify results output format",
|
|
6516
|
-
"
|
|
6747
|
+
"longDescription": "Specifies results output format written directly to the console.",
|
|
6517
6748
|
"options": [
|
|
6518
6749
|
"csv",
|
|
6519
6750
|
"html",
|
|
@@ -6522,78 +6753,130 @@
|
|
|
6522
6753
|
"sarif",
|
|
6523
6754
|
"table",
|
|
6524
6755
|
"xml"
|
|
6525
|
-
]
|
|
6756
|
+
],
|
|
6757
|
+
"input": [],
|
|
6758
|
+
"multiple": false,
|
|
6759
|
+
"type": "option"
|
|
6526
6760
|
},
|
|
6527
6761
|
"outfile": {
|
|
6528
|
-
"
|
|
6529
|
-
"type": "option",
|
|
6762
|
+
"kind": "string",
|
|
6530
6763
|
"char": "o",
|
|
6531
|
-
"description": "write output to a file"
|
|
6764
|
+
"description": "write output to a file",
|
|
6765
|
+
"longDescription": "Writes output to a file.",
|
|
6766
|
+
"input": [],
|
|
6767
|
+
"multiple": false,
|
|
6768
|
+
"type": "option"
|
|
6532
6769
|
},
|
|
6533
6770
|
"severity-threshold": {
|
|
6534
|
-
"
|
|
6535
|
-
"type": "option",
|
|
6771
|
+
"kind": "integer",
|
|
6536
6772
|
"char": "s",
|
|
6537
|
-
"description": "throw an error when a violation threshold is reached, the --normalize-severity is invoked, and severity levels are reset to the baseline"
|
|
6773
|
+
"description": "throw an error when a violation threshold is reached, the --normalize-severity is invoked, and severity levels are reset to the baseline",
|
|
6774
|
+
"longDescription": "Throws an error when violations are found with equal or greater severity than the provided value. Values are 1 (high), 2 (moderate), and 3 (low). Exit code is the most severe violation. Using this flag also invokes the --normalize-severity flag.",
|
|
6775
|
+
"exclusive": [
|
|
6776
|
+
"json"
|
|
6777
|
+
],
|
|
6778
|
+
"min": 1,
|
|
6779
|
+
"max": 3,
|
|
6780
|
+
"input": [],
|
|
6781
|
+
"multiple": false,
|
|
6782
|
+
"type": "option"
|
|
6538
6783
|
},
|
|
6539
6784
|
"normalize-severity": {
|
|
6540
|
-
"
|
|
6541
|
-
"type": "boolean",
|
|
6785
|
+
"kind": "boolean",
|
|
6542
6786
|
"description": "return normalized severity 1 (high), 2 (moderate), and 3 (low), and the engine-specific severity",
|
|
6543
|
-
"
|
|
6787
|
+
"longDescription": "Returns normalized severity 1 (high), 2 (moderate), and 3 (low), and the engine-specific severity. For the html option, the normalized severity is displayed instead of the engine severity.",
|
|
6788
|
+
"allowNo": false,
|
|
6789
|
+
"type": "boolean"
|
|
6544
6790
|
},
|
|
6545
6791
|
"projectdir": {
|
|
6546
|
-
"
|
|
6547
|
-
"type": "option",
|
|
6792
|
+
"kind": "array",
|
|
6548
6793
|
"char": "p",
|
|
6549
|
-
"description": "provide root directory of project"
|
|
6794
|
+
"description": "provide root directory of project",
|
|
6795
|
+
"longDescription": "Provides the relative or absolute root project directory used to set the context for Graph Engine's analysis. Project directory must be a path, not a glob. Specify multiple values as a comma-separated list.",
|
|
6796
|
+
"input": [],
|
|
6797
|
+
"multiple": false,
|
|
6798
|
+
"type": "option"
|
|
6550
6799
|
},
|
|
6551
6800
|
"with-pilot": {
|
|
6552
|
-
"
|
|
6553
|
-
"type": "boolean",
|
|
6801
|
+
"kind": "boolean",
|
|
6554
6802
|
"description": "allow pilot rules to execute",
|
|
6555
|
-
"
|
|
6803
|
+
"longDescription": "Allows pilot rules to execute.",
|
|
6804
|
+
"allowNo": false,
|
|
6805
|
+
"type": "boolean"
|
|
6556
6806
|
},
|
|
6557
6807
|
"target": {
|
|
6558
|
-
"
|
|
6559
|
-
"type": "option",
|
|
6808
|
+
"kind": "array",
|
|
6560
6809
|
"char": "t",
|
|
6561
6810
|
"description": "return location of source code",
|
|
6562
|
-
"
|
|
6811
|
+
"longDescription": "Returns the source code location. Use glob patterns or specify individual methods with #-syntax. Multiple values are specified as a comma-separated list.",
|
|
6812
|
+
"required": true,
|
|
6813
|
+
"input": [],
|
|
6814
|
+
"multiple": false,
|
|
6815
|
+
"type": "option"
|
|
6563
6816
|
},
|
|
6564
6817
|
"rule-thread-count": {
|
|
6565
|
-
"
|
|
6566
|
-
"
|
|
6567
|
-
"
|
|
6818
|
+
"kind": "integer",
|
|
6819
|
+
"description": "specify number of threads that evaluate DFA rules. Alternatively, set value using environment variable `SFGE_RULE_THREAD_COUNT`. Default is 4",
|
|
6820
|
+
"longDescription": "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.",
|
|
6821
|
+
"env": "SFGE_RULE_THREAD_COUNT",
|
|
6822
|
+
"input": [],
|
|
6823
|
+
"multiple": false,
|
|
6824
|
+
"type": "option"
|
|
6568
6825
|
},
|
|
6569
6826
|
"rule-thread-timeout": {
|
|
6570
|
-
"
|
|
6571
|
-
"
|
|
6572
|
-
"
|
|
6827
|
+
"kind": "integer",
|
|
6828
|
+
"description": "specify timeout for individual rule threads in milliseconds. Alternatively, set the timeout value using environment variable `SFGE_RULE_THREAD_TIMEOUT`. Default: 90000 ms",
|
|
6829
|
+
"longDescription": "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.",
|
|
6830
|
+
"env": "SFGE_RULE_THREAD_TIMEOUT",
|
|
6831
|
+
"input": [],
|
|
6832
|
+
"multiple": false,
|
|
6833
|
+
"type": "option"
|
|
6573
6834
|
},
|
|
6574
6835
|
"rule-disable-warning-violation": {
|
|
6575
|
-
"
|
|
6576
|
-
"type": "boolean",
|
|
6836
|
+
"kind": "boolean",
|
|
6577
6837
|
"description": "disable warning violations from Salesforce Graph Engine. Alternatively, set value using environment variable `SFGE_RULE_DISABLE_WARNING_VIOLATION`",
|
|
6578
|
-
"
|
|
6838
|
+
"longDescription": "Disables warning violations, such as those on StripInaccessible READ access, to get only high-severity violations (default: false). Inherits value from SFGE_RULE_DISABLE_WARNING_VIOLATION env-var if set.",
|
|
6839
|
+
"allowNo": false,
|
|
6840
|
+
"type": "boolean"
|
|
6579
6841
|
},
|
|
6580
6842
|
"sfgejvmargs": {
|
|
6581
|
-
"
|
|
6582
|
-
"
|
|
6583
|
-
"
|
|
6843
|
+
"kind": "string",
|
|
6844
|
+
"description": "specify Java Virtual Machine (JVM) arguments to optimize Salesforce Graph Engine execution to your system (optional)",
|
|
6845
|
+
"longDescription": "Specifies Java Virtual Machine arguments to override system defaults while executing Salesforce Graph Engine. For multiple arguments, add them to the same string separated by space.",
|
|
6846
|
+
"env": "SFGE_JVM_ARGS",
|
|
6847
|
+
"input": [],
|
|
6848
|
+
"multiple": false,
|
|
6849
|
+
"type": "option"
|
|
6584
6850
|
},
|
|
6585
6851
|
"pathexplimit": {
|
|
6586
|
-
"
|
|
6587
|
-
"
|
|
6588
|
-
"
|
|
6852
|
+
"kind": "integer",
|
|
6853
|
+
"description": "specify a path expansion upper boundary to limit the complexity of code that Graph Engine analyzes. Alternatively, set the value using environment variable `SFGE_PATH_EXPANSION_LIMIT`",
|
|
6854
|
+
"longDescription": "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.",
|
|
6855
|
+
"env": "SFGE_PATH_EXPANSION_LIMIT",
|
|
6856
|
+
"input": [],
|
|
6857
|
+
"multiple": false,
|
|
6858
|
+
"type": "option"
|
|
6589
6859
|
}
|
|
6590
6860
|
},
|
|
6591
|
-
"
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6861
|
+
"longDescription": "Scans codebase with all DFA rules by default.\n\tSpecify the format of output and print results directly or as contents of a file that you provide with --outfile flag.",
|
|
6862
|
+
"isESM": false,
|
|
6863
|
+
"relativePath": [
|
|
6864
|
+
"lib",
|
|
6865
|
+
"commands",
|
|
6866
|
+
"scanner",
|
|
6867
|
+
"run",
|
|
6868
|
+
"dfa.js"
|
|
6869
|
+
],
|
|
6870
|
+
"aliasPermutations": [],
|
|
6871
|
+
"permutations": [
|
|
6872
|
+
"scanner:run:dfa",
|
|
6873
|
+
"run:scanner:dfa",
|
|
6874
|
+
"run:dfa:scanner",
|
|
6875
|
+
"scanner:dfa:run",
|
|
6876
|
+
"dfa:scanner:run",
|
|
6877
|
+
"dfa:run:scanner"
|
|
6595
6878
|
]
|
|
6596
6879
|
}
|
|
6597
6880
|
},
|
|
6598
|
-
"version": "2.
|
|
6881
|
+
"version": "2.17.0"
|
|
6599
6882
|
}
|