-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpackage.json
More file actions
287 lines (287 loc) · 12.3 KB
/
package.json
File metadata and controls
287 lines (287 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
{
"name": "sfdx-code-analyzer-vscode",
"displayName": "Salesforce Code Analyzer",
"description": "Salesforce Code Analyzer is a unified tool for source code analysis. Run Code Analyzer to scan multiple languages in your code and add diagnostic info to your code that describes the violations.",
"o11yUploadEndpoint": "https://794testsite.my.site.com/byolwr/webruntime/log/metrics",
"enableO11y": "true",
"productFeatureId": "aJCEE0000000mDK4AY",
"bugs": {
"url": "https://github.com/forcedotcom/code-analyzer/issues"
},
"repository": {
"url": "https://github.com/forcedotcom/sfdx-code-analyzer-vscode"
},
"icon": "images/CodeAnalyzer-small.png",
"galleryBanner": {
"color": "#ECECEC",
"theme": "light"
},
"version": "1.16.0",
"publisher": "salesforce",
"license": "BSD-3-Clause",
"engines": {
"vscode": "^1.109.0",
"node": ">=20.9.0"
},
"categories": [
"Programming Languages",
"Linters",
"Testing"
],
"keywords": [
"Salesforce Code Analyzer",
"Code Analyzer",
"SFCA"
],
"dependencies": {
"@salesforce/vscode-service-provider": "^1.5.0",
"@types/jest": "^30.0.0",
"@types/semver": "^7.7.1",
"@types/tmp": "^0.2.6",
"diff": "^8.0.3",
"glob": "^13.0.6",
"semver": "^7.7.4",
"tmp": "^0.2.5"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@types/node": "^20.0.0",
"@types/vscode": "^1.109.0",
"@vscode/vsce": "^3.7.1",
"esbuild": "^0.27.3",
"eslint": "^9.39.2",
"husky": "^9.1.7",
"jest": "^30.2.0",
"jest-mock-vscode": "~4.10.0",
"ovsx": "^0.10.9",
"proxyquire": "^2.1.3",
"rimraf": "*",
"ts-jest": "^29.4.6",
"ts-node": "^10.9.2",
"typescript": "^5.9.3",
"typescript-eslint": "^8.56.0"
},
"extensionDependencies": [
"salesforce.salesforcedx-vscode-core"
],
"scripts": {
"postinstall": "cd end-to-end && npm install && cd ..",
"vscode:prepublish": "npm run package",
"build": "npm run compile",
"package": "npm run compile && npm run lint && node esbuild.js --production",
"precompile": "tsc --build --clean && rimraf out",
"compile": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"lint": "eslint src",
"test": "npm run test:unit && npm run test:e2e",
"pretest:unit": "tsc --build ./test/tsconfig.json --noEmit",
"test:unit": "jest --coverage",
"test:e2e": "cd end-to-end && npm run test && cd ..",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"clean": "npm run precompile && rimraf coverage",
"showcoverage": "open ./coverage/unit/lcov-report/index.html",
"prepare": "husky"
},
"activationEvents": [
"workspaceContains:sfdx-project.json",
"onLanguage:apex",
"onLanguage:soql",
"onLanguage:visualforce"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "sfca.runOnActiveFile",
"title": "SFDX: Scan Current File with Code Analyzer"
},
{
"command": "sfca.runOnSelected",
"title": "SFDX: Scan Selected Files or Folders with Code Analyzer"
},
{
"command": "sfca.removeDiagnosticsOnActiveFile",
"title": "SFDX: Clear Code Analyzer Violations from Current File"
},
{
"command": "sfca.removeDiagnosticsOnSelectedFile",
"title": "SFDX: Clear Code Analyzer Violations from Selected Files or Folders"
},
{
"command": "sfca.runApexGuruAnalysisOnSelectedFile",
"title": "SFDX: Scan Selected File for Performance Issues with ApexGuru"
},
{
"command": "sfca.runApexGuruAnalysisOnCurrentFile",
"title": "SFDX: Scan Current File for Performance Issues with ApexGuru"
}
],
"configuration": [
{
"title": "General",
"properties": {
"codeAnalyzer.analyzeOnSave.enabled": {
"type": "boolean",
"default": false,
"description": "Scan files on save automatically."
},
"codeAnalyzer.analyzeOnOpen.enabled": {
"type": "boolean",
"default": false,
"description": "Scan files on open automatically."
},
"codeAnalyzer.analyzeAutomatically.fileTypes": {
"type": "string",
"default": ".cls,.js,.apex,.trigger,.ts,.xml",
"pattern": "^[.][A-Za-z0-9]+(?:,[.][A-Za-z0-9]+)*$",
"patternErrorMessage": "Must be a comma-separated list of file extensions (e.g., '.cls,.js,.html'). Each extension must start with a dot and contain only alphanumeric characters, with no spaces.",
"markdownDescription": "Comma-separated list of file extensions to analyze automatically when opening or saving files.\n\nSpecify the file types that should be scanned by Code Analyzer when the 'Analyze On Save' or 'Analyze On Open' features are enabled. Include the dot (.) prefix for each extension (e.g., `.cls,.js,.html`).\n\n**Format:** `.ext1,.ext2,.ext3`"
}
}
},
{
"title": "Configuration",
"properties": {
"codeAnalyzer.configFile": {
"type": "string",
"default": "",
"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)."
},
"codeAnalyzer.ruleSelectors": {
"type": "string",
"default": "Recommended",
"markdownDescription": "Selection of rules used to scan your code with Code Analyzer.\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)."
}
}
},
{
"title": "Diagnostic Levels",
"properties": {
"codeAnalyzer.severity 1": {
"type": "string",
"enum": [
"Error",
"Warning",
"Info"
],
"default": "Warning",
"markdownDescription": "Diagnostic level for severity 1 violations (highest severity)."
},
"codeAnalyzer.severity 2": {
"type": "string",
"enum": [
"Error",
"Warning",
"Info"
],
"default": "Warning",
"markdownDescription": "Diagnostic level for severity 2 violations."
},
"codeAnalyzer.severity 3": {
"type": "string",
"enum": [
"Error",
"Warning",
"Info"
],
"default": "Warning",
"markdownDescription": "Diagnostic level for severity 3 violations."
},
"codeAnalyzer.severity 4": {
"type": "string",
"enum": [
"Error",
"Warning",
"Info"
],
"default": "Warning",
"markdownDescription": "Diagnostic level for severity 4 violations."
},
"codeAnalyzer.severity 5": {
"type": "string",
"enum": [
"Error",
"Warning",
"Info"
],
"default": "Warning",
"markdownDescription": "Diagnostic level for severity 5 violations (lowest severity)."
}
}
}
],
"menus": {
"commandPalette": [
{
"command": "sfca.runOnActiveFile",
"when": "sfca.extensionActivated"
},
{
"command": "sfca.runOnSelected",
"when": "false"
},
{
"command": "sfca.removeDiagnosticsOnActiveFile",
"when": "sfca.extensionActivated"
},
{
"command": "sfca.removeDiagnosticsOnSelectedFile",
"when": "false"
},
{
"command": "sfca.runApexGuruAnalysisOnSelectedFile",
"when": "false"
},
{
"command": "sfca.runApexGuruAnalysisOnCurrentFile",
"when": "sfca.extensionActivated && sfca.shouldShowApexGuruButtons && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
}
],
"editor/context": [
{
"command": "sfca.runOnActiveFile",
"when": "sfca.extensionActivated"
},
{
"command": "sfca.removeDiagnosticsOnActiveFile",
"when": "sfca.extensionActivated"
},
{
"command": "sfca.runApexGuruAnalysisOnCurrentFile",
"when": "sfca.extensionActivated && sfca.shouldShowApexGuruButtons && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
}
],
"explorer/context": [
{
"command": "sfca.runOnSelected",
"when": "sfca.extensionActivated"
},
{
"command": "sfca.removeDiagnosticsOnSelectedFile",
"when": "sfca.extensionActivated"
},
{
"command": "sfca.runApexGuruAnalysisOnSelectedFile",
"when": "sfca.extensionActivated && sfca.shouldShowApexGuruButtons && explorerResourceIsFolder == false && resourceExtname =~ /\\.cls|\\.trigger|\\.apex/"
}
]
},
"languages": [
{
"id": "apex",
"aliases": [
"Apex",
"apex"
],
"extensions": [
".cls",
".trigger",
".soql",
".apex"
]
}
]
}
}