|
13 | 13 | "color": "#ECECEC", |
14 | 14 | "theme": "light" |
15 | 15 | }, |
16 | | - "version": "1.5.1", |
| 16 | + "version": "1.6.0", |
17 | 17 | "publisher": "salesforce", |
18 | 18 | "license": "BSD-3-Clause", |
19 | 19 | "engines": { |
|
35 | 35 | "@types/jest": "^29.5.14", |
36 | 36 | "@types/semver": "^7.5.8", |
37 | 37 | "@types/tmp": "^0.2.6", |
38 | | - "cross-spawn": "^7.0.6", |
| 38 | + "diff": "^5.2.0", |
39 | 39 | "glob": "^11.0.1", |
40 | 40 | "semver": "^7.7.1", |
41 | 41 | "tmp": "^0.2.3" |
42 | 42 | }, |
43 | 43 | "devDependencies": { |
44 | 44 | "@eslint/js": "^9.21.0", |
| 45 | + "@types/diff": "^5.2.0", |
45 | 46 | "@types/chai": "^4.3.5", |
46 | | - "@types/cross-spawn": "^6.0.2", |
47 | 47 | "@types/mocha": "^10.0.1", |
48 | 48 | "@types/node": "^22.13.6", |
49 | 49 | "@types/sinon": "^10.0.15", |
|
90 | 90 | "showcoverage-legacy": "open ./coverage/legacy/lcov-report/index.html" |
91 | 91 | }, |
92 | 92 | "activationEvents": [ |
93 | | - "workspaceContains:sfdx-project.json" |
| 93 | + "workspaceContains:sfdx-project.json", |
| 94 | + "onLanguage:apex", |
| 95 | + "onLanguage:soql", |
| 96 | + "onLanguage:visualforce" |
94 | 97 | ], |
95 | 98 | "main": "./out/extension.js", |
96 | 99 | "contributes": { |
|
132 | 135 | { |
133 | 136 | "title": "General", |
134 | 137 | "properties": { |
135 | | - "codeAnalyzer.enableV5": { |
136 | | - "type": "boolean", |
137 | | - "default": false, |
138 | | - "description": "Use Code Analyzer v5 (Beta) instead of Code Analyzer v4." |
139 | | - }, |
140 | 138 | "codeAnalyzer.analyzeOnSave.enabled": { |
141 | 139 | "type": "boolean", |
142 | 140 | "default": false, |
|
150 | 148 | "codeAnalyzer.apexGuru.enabled": { |
151 | 149 | "type": "boolean", |
152 | 150 | "default": false, |
153 | | - "description": "Discover critical problems and performance issues in your Apex code with ApexGuru, which analyzes your Apex files for you. This feature is in a closed pilot; contact your account representative to learn more." |
| 151 | + "description": "(Pilot) Discover critical problems and performance issues in your Apex code with ApexGuru, which analyzes your Apex files for you. This feature is in a closed pilot; contact your account representative to learn more." |
| 152 | + }, |
| 153 | + "codeAnalyzer.Use v4 (Deprecated)": { |
| 154 | + "type": "boolean", |
| 155 | + "default": false, |
| 156 | + "markdownDescription": "Use Code Analyzer v4 (Deprecated) instead of Code Analyzer v5.\n\nWe no longer support Code Analyzer v4 and will soon remove this setting. We highly recommend that you use [Code Analyzer v5](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/code-analyzer.html) instead. Selecting this setting ignores the Code Analyzer v5 settings and uses the v4 settings instead.\n\nIf you have having trouble switching to v5, create an [issue](https://github.com/forcedotcom/sfdx-code-analyzer-vscode/issues)." |
154 | 157 | } |
155 | 158 | } |
156 | 159 | }, |
157 | 160 | { |
158 | | - "title": "Code Analyzer v5 (Beta)", |
| 161 | + "title": "Code Analyzer v5", |
159 | 162 | "properties": { |
| 163 | + "codeAnalyzer.configFile": { |
| 164 | + "type": "string", |
| 165 | + "default": "", |
| 166 | + "markdownDescription": "Path to a [Code Analyzer configuration file](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/config-custom.html) used to customize the engines and rules.\n\nCode Analyzer has an internal default configuration for its rule and engine properties. If you want to override these defaults, you can either add a 'code-analyzer.yml' or 'code-analyzer.yaml' file at the root of your project or explicitly specify your configuration file path with this setting.\n\nThis setting is equivalent to the `--config-file` flag of the CLI commands. See [configuration schema](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/config-toplevel.html)." |
| 167 | + }, |
160 | 168 | "codeAnalyzer.ruleSelectors": { |
161 | 169 | "type": "string", |
162 | 170 | "default": "Recommended", |
163 | | - "markdownDescription": "Specifies the default set of rules to use when executing Code Analyzer v5 (Beta). Specify the rules using their name, engine name, severity level, tag, or a combination. Use commas for unions (such as \"Security,Performance\") and colons for intersections (such as \"pmd:Security\" or \"eslint:3\")." |
| 171 | + "markdownDescription": "Selection of rules used to scan your code with Code Analyzer v5.\n\nSelect rules using their name, engine name, severity level, tag, or a combination. Use commas for unions (such as \"Security,Performance\") and colons for intersections (such as \"pmd:Security\" or \"eslint:3\").\n\nThis setting is equivalent to the `--rule-selector` flag of the CLI commands. See [examples](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_code-analyzer_commands_unified.htm#cli_reference_code-analyzer_rules_unified)." |
164 | 172 | } |
165 | 173 | } |
166 | 174 | }, |
167 | 175 | { |
168 | | - "title": "Code Analyzer v4", |
| 176 | + "title": "Code Analyzer v4 (Deprecated)", |
169 | 177 | "properties": { |
170 | 178 | "codeAnalyzer.pMD.customConfigFile": { |
171 | 179 | "type": "string", |
|
217 | 225 | "commandPalette": [ |
218 | 226 | { |
219 | 227 | "command": "sfca.runOnActiveFile", |
220 | | - "when": "true" |
| 228 | + "when": "sfca.extensionActivated" |
221 | 229 | }, |
222 | 230 | { |
223 | 231 | "command": "sfca.runOnSelected", |
|
229 | 237 | }, |
230 | 238 | { |
231 | 239 | "command": "sfca.runDfa", |
232 | | - "when": "sfca.partialRunsEnabled && sfca.codeAnalyzerV4Enabled" |
| 240 | + "when": "sfca.extensionActivated && sfca.partialRunsEnabled && sfca.codeAnalyzerV4Enabled" |
233 | 241 | }, |
234 | 242 | { |
235 | 243 | "command": "sfca.removeDiagnosticsOnActiveFile", |
236 | | - "when": "true" |
| 244 | + "when": "sfca.extensionActivated" |
237 | 245 | }, |
238 | 246 | { |
239 | 247 | "command": "sfca.removeDiagnosticsOnSelectedFile", |
|
245 | 253 | }, |
246 | 254 | { |
247 | 255 | "command": "sfca.runApexGuruAnalysisOnCurrentFile", |
248 | | - "when": "sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/" |
| 256 | + "when": "sfca.extensionActivated && sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/" |
249 | 257 | } |
250 | 258 | ], |
251 | 259 | "editor/context": [ |
252 | 260 | { |
253 | 261 | "command": "sfca.runOnActiveFile", |
254 | | - "when": "true" |
| 262 | + "when": "sfca.extensionActivated" |
255 | 263 | }, |
256 | 264 | { |
257 | 265 | "command": "sfca.runDfaOnSelectedMethod", |
258 | | - "when": "sfca.codeAnalyzerV4Enabled" |
| 266 | + "when": "sfca.extensionActivated && sfca.codeAnalyzerV4Enabled" |
259 | 267 | }, |
260 | 268 | { |
261 | 269 | "command": "sfca.removeDiagnosticsOnActiveFile", |
262 | | - "when": "true" |
| 270 | + "when": "sfca.extensionActivated" |
263 | 271 | }, |
264 | 272 | { |
265 | 273 | "command": "sfca.runApexGuruAnalysisOnCurrentFile", |
266 | | - "when": "sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/" |
| 274 | + "when": "sfca.extensionActivated && sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/" |
267 | 275 | } |
268 | 276 | ], |
269 | 277 | "explorer/context": [ |
270 | 278 | { |
271 | 279 | "command": "sfca.runOnSelected", |
272 | | - "when": "true" |
| 280 | + "when": "sfca.extensionActivated" |
273 | 281 | }, |
274 | 282 | { |
275 | 283 | "command": "sfca.removeDiagnosticsOnSelectedFile", |
276 | | - "when": "true" |
| 284 | + "when": "sfca.extensionActivated" |
277 | 285 | }, |
278 | 286 | { |
279 | 287 | "command": "sfca.runApexGuruAnalysisOnSelectedFile", |
280 | | - "when": "sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/" |
| 288 | + "when": "sfca.extensionActivated && sfca.apexGuruEnabled && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/" |
281 | 289 | } |
282 | 290 | ] |
283 | 291 | }, |
|
0 commit comments