coc-sonarlint 0.0.0-development

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/package.json ADDED
@@ -0,0 +1,459 @@
1
+ {
2
+ "name": "coc-sonarlint",
3
+ "version": "0.0.0-development",
4
+ "description": "sonarlint for coc.nvim",
5
+ "author": "Svetlozar Iliev <svetlozar321@gmail.com>",
6
+ "license": "MIT",
7
+ "main": "lib/index.js",
8
+ "keywords": [
9
+ "coc.nvim"
10
+ ],
11
+ "engines": {
12
+ "coc": "^0.0.82"
13
+ },
14
+ "scripts": {
15
+ "watch": "node esbuild.mjs --watch",
16
+ "build": "node esbuild.mjs",
17
+ "prepare": "node esbuild.mjs"
18
+ },
19
+ "dependencies": {
20
+ "find-java-home": "1.2.2"
21
+ },
22
+ "devDependencies": {
23
+ "@types/fs-extra": "^8.0.0",
24
+ "@types/vscode": "^1.73.1",
25
+ "@types/glob": "5.0.30",
26
+ "@types/semver": "^7.3.8",
27
+ "@types/winreg": "^1.2.30",
28
+ "@types/node": "^14.14",
29
+ "@types/marked": "^4.0.1",
30
+ "@types/uuid": "^8.3.0",
31
+ "typescript": "^4.9.4",
32
+ "coc.nvim": "^0.0.83-next.17",
33
+ "vscode-languageserver-protocol": "^3.17.2",
34
+ "esbuild": "^0.15.13",
35
+ "compare-versions": "4.1.3",
36
+ "expand-home-dir": "^0.0.3",
37
+ "lodash.findindex": "^4.6.0",
38
+ "lodash.template": ">=4.5.0",
39
+ "fs-extra": "^8.1.0",
40
+ "path-exists": "4.0.0"
41
+ },
42
+ "activationEvents": [
43
+ "onLanguage:c",
44
+ "onLanguage:cpp",
45
+ "onLanguage:cuda",
46
+ "onLanguage:objc",
47
+ "onLanguage:objcpp",
48
+ "onLanguage:opencl",
49
+ "onLanguage:objective-c",
50
+ "onLanguage:objective-cpp",
51
+ "onLanguage:php",
52
+ "onLanguage:java",
53
+ "onLanguage:cs",
54
+ "onLanguage:vb",
55
+ "onLanguage:markdown",
56
+ "onLanguage:css",
57
+ "onLanguage:less",
58
+ "onLanguage:scss",
59
+ "onLanguage:go",
60
+ "onLanguage:gomod",
61
+ "onLanguage:python",
62
+ "onLanguage:jupyter",
63
+ "onLanguage:javascript",
64
+ "onLanguage:javascriptreact",
65
+ "onLanguage:javascript.jsx",
66
+ "onLanguage:typescript",
67
+ "onLanguage:typescript.tsx",
68
+ "onLanguage:typescript.jsx",
69
+ "onLanguage:typescriptreact",
70
+ "onLanguage:jsx-tags",
71
+ "onLanguage:jsonc",
72
+ "workspaceContains:*/pom.xml",
73
+ "workspaceContains:build.gradle",
74
+ "workspaceContains:.sonar.properties"
75
+ ],
76
+ "contributes": {
77
+ "rootPatterns": [
78
+ {
79
+ "filetype": "*",
80
+ "patterns": [
81
+ ".git",
82
+ "package.json"
83
+ ]
84
+ }
85
+ ],
86
+ "configuration": {
87
+ "type": "object",
88
+ "title": "SonarLint",
89
+ "properties": {
90
+ "sonarlint.rules": {
91
+ "order": 1,
92
+ "type": "object",
93
+ "scope": "application",
94
+ "default": { },
95
+ "markdownDescription": "Customize applied rule set. This property contains a list of rules whose activation level or parameter values differ from the one provided by default. In [Connected Mode](command:SonarLint.HelpAndFeedbackLinkClicked?%22connectedModeDocs%22), this configuration is overridden by the projects's Quality Profile, as configured on server side and can be **shared among contributors**. See [SonarLint Rules](command:SonarLint.AllRules.focus) view for the list of **locally** available rules.\n\nExample:\n\n \"sonarlint.rules\": {\n \"javascript:1481\": {\n \"level\": \"off\",\n \"javascript:S103\": {\n \"level\": \"on\",\n \"parameters\": {\n \"maximumLineLength\": \"120\"\n }\n }\n }\n",
96
+ "patternProperties": {
97
+ "^[^:]+:[^:]+$": {
98
+ "type": "object",
99
+ "markdownDescription": "Property names are rule keys in the form: `repo:key`",
100
+ "properties": {
101
+ "level": {
102
+ "type": "string",
103
+ "enum": [
104
+ "off",
105
+ "on"
106
+ ],
107
+ "markdownDescription": "When set to `off`, disable the rule. When set to `on`, enable the rule."
108
+ },
109
+ "parameters": {
110
+ "type": "object",
111
+ "markdownDescription": "Rule parameters. See rule description for accepted parameters. E.g `{ \"intParam\": \"123\" }`."
112
+ },
113
+ "additionalProperties": false
114
+ }
115
+ }
116
+ },
117
+ "additionalProperties": false
118
+ },
119
+ "sonarlint.connectedMode.servers": {
120
+ "deprecationMessage": "The setting is deprecated. Use `sonarlint.connectedMode.connections.sonarqube` or `sonarlint.connectedMode.connections.sonarcloud` instead.",
121
+ "type": "array",
122
+ "scope": "application",
123
+ "default": [ ],
124
+ "markdownDescription": "Configure one or more connection(s) to SonarQube/SonarCloud. For security reasons, the token should not be stored in SCM with workspace settings. The `serverId` can be any identifier and will be referenced in `#sonarlint.connectedMode.project#`.\n\nExample for SonarCloud:\n\n \"sonarlint.connectedMode.servers\": [\n {\n \"serverId\": \"my_orga_in_sonarcloud.io\",\n \"serverUrl\": \"https://sonarcloud.io\",\n \"organizationKey\": \"my_organization\",\n \"token\": \"V2VkIE1...\"\n }\n ]\n\nExample for SonarQube:\n\n \"sonarlint.connectedMode.servers\": [\n {\n \"serverId\": \"my_sonarqube\",\n \"serverUrl\": \"https://sonar.mycompany.com\",\n \"token\": \"V2VkIE1...\"\n }\n ]",
125
+ "items": {
126
+ "properties": {
127
+ "serverId": {
128
+ "type": "string",
129
+ "description": "A unique identifier for this server connection. Will be referenced from `#sonarlint.connectedMode.project#`"
130
+ },
131
+ "serverUrl": {
132
+ "type": "string",
133
+ "description": "URL of the server. Use https://sonarcloud.io for SonarCloud."
134
+ },
135
+ "token": {
136
+ "type": "string",
137
+ "description": "Token generated from My Account>Security in SonarQube/SonarCloud"
138
+ },
139
+ "organizationKey": {
140
+ "type": "string",
141
+ "description": "Only used for SonarCloud"
142
+ }
143
+ },
144
+ "additionalProperties": false
145
+ }
146
+ },
147
+ "sonarlint.connectedMode.connections.sonarqube": {
148
+ "order": 2,
149
+ "type": "array",
150
+ "scope": "application",
151
+ "default": [ ],
152
+ "markdownDescription": "Connect SonarLint to SonarQube to apply the same Clean Code standards as your team. Analyze more languages, detect more issues **on the whole project**, receive notifications about the quality gate status, and more. Quality Profiles and file exclusion settings defined on the server are shared between all connected users. Please find the documentation [here](https://docs.sonarsource.com/sonarlint/vs-code/team-features/connected-mode/)",
153
+ "items": {
154
+ "type": "object",
155
+ "properties": {
156
+ "connectionId": {
157
+ "type": "string",
158
+ "description": "A unique identifier for this connection to be used as a reference in `#sonarlint.connectedMode.project#`. Only needed if you plan to use multiple connections to SonarQube/SonarCloud."
159
+ },
160
+ "serverUrl": {
161
+ "type": "string",
162
+ "description": "URL of the SonarQube server."
163
+ },
164
+ "token": {
165
+ "type": "string",
166
+ "description": "Token generated from 'My Account>Security' in SonarQube"
167
+ },
168
+ "disableNotifications": {
169
+ "type": "boolean",
170
+ "description": "SonarLint will show notifications for bound projects when there are new issues assigned to you, or when the quality gate status changed. Set to false to disable all notifications for projects bound to this connection."
171
+ }
172
+ },
173
+ "additionalProperties": false,
174
+ "required": [
175
+ "serverUrl"
176
+ ],
177
+ "examples": [
178
+ {
179
+ "serverUrl": "https://<replace_with_your_sonarqube_server_url>"
180
+ },
181
+ {
182
+ "connectionId": "MyCompanySonarQube",
183
+ "serverUrl": "https://<replace_with_your_sonarqube_server_url>",
184
+ "disableNotifications": false
185
+ }
186
+ ]
187
+ }
188
+ },
189
+ "sonarlint.connectedMode.connections.sonarcloud": {
190
+ "order": 3,
191
+ "type": "array",
192
+ "scope": "application",
193
+ "default": [ ],
194
+ "markdownDescription": "Connect SonarLint to SonarCloud to apply the same Clean Code standards as your team. Analyze more languages, detect more issues **on the whole project**, receive notifications about the quality gate status, and more. Quality Profiles and file exclusion settings defined on the server are shared between all connected users. Please find the documentation [here](https://docs.sonarsource.com/sonarlint/vs-code/team-features/connected-mode/)",
195
+ "items": {
196
+ "type": "object",
197
+ "properties": {
198
+ "connectionId": {
199
+ "type": "string",
200
+ "description": "A unique identifier for this connection to be used as a reference in `#sonarlint.connectedMode.project#`. Only needed if you plan to use multiple connections to SonarQube/SonarCloud."
201
+ },
202
+ "organizationKey": {
203
+ "type": "string",
204
+ "description": "A SonarCloud organization key. If you want to bind different projects that are in different organizations, simply declare multiple connections."
205
+ },
206
+ "token": {
207
+ "type": "string",
208
+ "description": "Token generated from 'My Account>Security' in SonarCloud"
209
+ },
210
+ "disableNotifications": {
211
+ "type": "boolean",
212
+ "description": "SonarLint will show notifications for bound projects when there are new issues assigned to you, or when the quality gate status changed. Set to false to disable all notifications for projects bound to this connection."
213
+ }
214
+ },
215
+ "additionalProperties": false,
216
+ "required": [
217
+ "organizationKey"
218
+ ],
219
+ "examples": [
220
+ {
221
+ "organizationKey": "<replace_with_your_sonarcloud_organization_key>"
222
+ },
223
+ {
224
+ "connectionId": "MyOrganization",
225
+ "organizationKey": "<replace_with_your_sonarcloud_organization_key>",
226
+ "disableNotifications": false
227
+ }
228
+ ]
229
+ }
230
+ },
231
+ "sonarlint.connectedMode.project": {
232
+ "order": 4,
233
+ "markdownDescription": "Bind the current workspace folder to a [SonarQube](command:SonarLint.HelpAndFeedbackLinkClicked?%22sonarQubeProductPage%22) or [SonarCloud](command:SonarLint.HelpAndFeedbackLinkClicked?%22sonarCloudProductPage%22) project. Requires connection details to be defined in the setting `#sonarlint.connectedMode.connections.sonarqube#` or `#sonarlint.connectedMode.connections.sonarcloud#`.\n\nBinding a workspace folder to a server project allows SonarLint to match, as much as possible, the same rules and settings as found on the server, and hence share the analysis configuration with other contributors.\n\nExample:\n\n \"sonarlint.connectedMode.project\": {\n \"projectKey\": \"my_project\",\n \"connectionId\":\"my_connection_id\"\n }\n\n",
234
+ "examples": [
235
+ {
236
+ "projectKey": "<replace_with_server_project_key>"
237
+ },
238
+ {
239
+ "connectionId": "<replace_with_connection_id>",
240
+ "projectKey": "<replace_with_server_project_key>"
241
+ }
242
+ ],
243
+ "default": { },
244
+ "anyOf": [
245
+ {
246
+ "type": "object",
247
+ "properties": {
248
+ "serverId": {
249
+ "type": "string",
250
+ "description": "Identifier of the server connection declared in `#sonarlint.connectedMode.connections.sonarqube#` or `#sonarlint.connectedMode.connections.sonarcloud#`"
251
+ },
252
+ "projectKey": {
253
+ "type": "string",
254
+ "description": "Key of the project in SonarQube/SonarCloud"
255
+ }
256
+ },
257
+ "additionalProperties": false,
258
+ "required": [
259
+ "serverId",
260
+ "projectKey"
261
+ ],
262
+ "deprecationMessage": "Replace `serverId` attribute by `connectionId`."
263
+ },
264
+ {
265
+ "type": "object",
266
+ "properties": {
267
+ "connectionId": {
268
+ "type": "string",
269
+ "description": "Identifier of the server connection declared in `#sonarlint.connectedMode.connections.sonarqube#` or `#sonarlint.connectedMode.connections.sonarcloud#`"
270
+ },
271
+ "projectKey": {
272
+ "type": "string",
273
+ "description": "Key of the project in SonarQube/SonarCloud (can be found on project homepage)"
274
+ }
275
+ },
276
+ "additionalProperties": false,
277
+ "required": [
278
+ "projectKey"
279
+ ]
280
+ }
281
+ ],
282
+ "scope": "resource"
283
+ },
284
+ "sonarlint.pathToNodeExecutable": {
285
+ "order": 10,
286
+ "type": "string",
287
+ "markdownDescription": "Path to a Node.js executable (18.18 or more recent) used to analyze JavaScript and TypeScript code. \nOn Windows, backslashes must be escaped, e.g. `C:\\\\Program Files\\\\NodeJS\\\\20-lts\\\\bin\\\\node.exe`",
288
+ "scope": "machine"
289
+ },
290
+ "sonarlint.pathToCompileCommands": {
291
+ "order": 11,
292
+ "type": "string",
293
+ "markdownDescription": "Path to the active compilation database, e.g. `C:\\\\Repos\\\\MyProject\\\\compile_commands.json`",
294
+ "scope": "resource"
295
+ },
296
+ "sonarlint.testFilePattern": {
297
+ "order": 12,
298
+ "type": "string",
299
+ "default": "",
300
+ "markdownDescription": "Files whose name match this [glob pattern](https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob) are considered as test files by analyzers. Most rules are *not* evaluated on test files.\n\nIn [Connected Mode](command:SonarLint.HelpAndFeedbackLinkClicked?%22connectedModeDocs%22), this setting is configured **on the server-side** and shared among all contributors.\n\nExample: `**/test/**,**/*test*,**/*Test*`",
301
+ "scope": "resource"
302
+ },
303
+ "sonarlint.analysisExcludesStandalone": {
304
+ "order": 13,
305
+ "type": "string",
306
+ "default": "",
307
+ "markdownDescription": "Files whose name match this [glob pattern](https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob) will not be processed by analyzers. In [Connected Mode](command:SonarLint.HelpAndFeedbackLinkClicked?%22connectedModeDocs%22) with SonarQube or SonarCloud, this property will be ignored and server exclusion settings will be applied. No rules are evaluated on excluded files. Example: `**/lib/**,**/*generated*`",
308
+ "scope": "resource"
309
+ },
310
+ "sonarlint.ls.javaHome": {
311
+ "order": 20,
312
+ "type": "string",
313
+ "markdownDescription": "Path to a Java Runtime Environment (17 or more recent) used to launch the SonarLint Language Server.\n* On Windows, backslashes must be escaped, e.g. `C:\\\\Program Files\\\\Java\\\\jdk-17` \n* On macOS, this path should include the `/Contents/Home` directory, e.g `/Library/Java/JavaVirtualMachines/corretto-17.0.5/Contents/Home`",
314
+ "scope": "machine"
315
+ },
316
+ "sonarlint.ls.directory": {
317
+ "order": 21,
318
+ "type": "string",
319
+ "markdownDescription": "Specifies the directory for where to sonar lint and its binaries, the directory must contain two folders, a server/ and analyzers/, where the server binary is located in the server/ folder and all analyzer binaries are located in the analyzers/ folder",
320
+ "scope": "machine"
321
+ },
322
+ "sonarlint.ls.vmargs": {
323
+ "order": 21,
324
+ "type": "string",
325
+ "markdownDescription": "Extra JVM arguments used to launch the SonarLint Language Server. e.g. `-Xmx1024m`",
326
+ "scope": "machine"
327
+ },
328
+ "sonarlint.output.showVerboseLogs": {
329
+ "order": 90,
330
+ "type": "boolean",
331
+ "default": false,
332
+ "description": "Enable verbose log level in the SonarLint output.",
333
+ "scope": "window"
334
+ },
335
+ "sonarlint.output.showAnalyzerLogs": {
336
+ "order": 91,
337
+ "type": "boolean",
338
+ "default": false,
339
+ "description": "Show analyzer's logs in the SonarLint output.",
340
+ "scope": "window"
341
+ },
342
+ "sonarlint.analyzerProperties": {
343
+ "order": 92,
344
+ "type": "object",
345
+ "patternProperties": {
346
+ "^.*$": {
347
+ "type": "string",
348
+ "markdownDescription": "One entry value"
349
+ },
350
+ "additionalProperties": false
351
+ },
352
+ "markdownDescription": "Extra properties that could be passed to the code analyzers. Only for advanced use cases.",
353
+ "scope": "resource"
354
+ },
355
+ "sonarlint.trace.server": {
356
+ "order": 98,
357
+ "default": "off",
358
+ "description": "Traces the communication between VS Code and the SonarLint language server.",
359
+ "scope": "window",
360
+ "anyOf": [
361
+ {
362
+ "type": "string",
363
+ "enum": [
364
+ "off",
365
+ "messages",
366
+ "verbose"
367
+ ],
368
+ "default": "off"
369
+ },
370
+ {
371
+ "type": "object",
372
+ "properties": {
373
+ "verbosity": {
374
+ "type": "string",
375
+ "enum": [
376
+ "off",
377
+ "messages",
378
+ "verbose"
379
+ ],
380
+ "default": "off"
381
+ },
382
+ "format": {
383
+ "type": "string",
384
+ "enum": [
385
+ "text",
386
+ "json"
387
+ ],
388
+ "default": "text"
389
+ }
390
+ },
391
+ "additionalProperties": false
392
+ }
393
+ ]
394
+ },
395
+ "sonarlint.disableTelemetry": {
396
+ "order": 99,
397
+ "type": "boolean",
398
+ "default": false,
399
+ "markdownDescription": "Disable sending anonymous usage statistics to SonarSource. Click [here](https://github.com/SonarSource/sonarlint-vscode/blob/master/telemetry-sample.md) to see a sample of the data that are collected.",
400
+ "scope": "window"
401
+ },
402
+ "sonarlint.focusOnNewCode": {
403
+ "order": 100,
404
+ "type": "boolean",
405
+ "default": false,
406
+ "markdownDescription": "Set SonarLint focus to new code. [Learn how](https://docs.sonarsource.com/sonarlint/vs-code/using-sonarlint/investigating-issues/#focusing-on-new-code) to deliver clean code with Clean as You Code.",
407
+ "scope": "window"
408
+ }
409
+ }
410
+ },
411
+ "commands": [
412
+ {
413
+ "command": "SonarLint.ShowSonarLintOutput",
414
+ "title": "Show SonarLint Output",
415
+ "category": "SonarLint"
416
+ },
417
+ {
418
+ "command": "SonarLint.EnableVerboseLogs",
419
+ "title": "Enable Verbose Logging",
420
+ "category": "SonarLint"
421
+ },
422
+ {
423
+ "command": "SonarLint.ConfigureCompilationDatabase",
424
+ "title": "Configure the compilation database for C and C++ analysis",
425
+ "category": "SonarLint"
426
+ },
427
+ {
428
+ "command": "SonarLint.DeactivateRule",
429
+ "title": "Deactivate",
430
+ "enablement": "view == SonarLint.AllRules"
431
+ },
432
+ {
433
+ "command": "SonarLint.ActivateRule",
434
+ "title": "Activate",
435
+ "enablement": "view == SonarLint.AllRules"
436
+ },
437
+ {
438
+ "command": "SonarLint.ShowAllRules",
439
+ "title": "All",
440
+ "enablement": "view == SonarLint.AllRules"
441
+ },
442
+ {
443
+ "command": "SonarLint.ShowActiveRules",
444
+ "title": "Active",
445
+ "enablement": "view == SonarLint.AllRules"
446
+ },
447
+ {
448
+ "command": "SonarLint.ShowInactiveRules",
449
+ "title": "Inactive",
450
+ "enablement": "view == SonarLint.AllRules"
451
+ },
452
+ {
453
+ "command": "SonarLint.FindRuleByKey",
454
+ "title": "Find Rule By Key",
455
+ "enablement": "view == SonarLint.AllRules"
456
+ }
457
+ ]
458
+ }
459
+ }
Binary file