forked from QiuminGe/cpp-check-lint
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
503 lines (503 loc) · 18.3 KB
/
package.json
File metadata and controls
503 lines (503 loc) · 18.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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
{
"name": "cpp-checker",
"displayName": "cpp-checker",
"description": "cppcheck cpplint",
"keywords": [
"cppcheck",
"cpplint"
],
"version": "1.4.10",
"publisher": "eBikeLabs",
"engines": {
"vscode": "^1.52.0"
},
"categories": [
"Linters"
],
"icon": "bin/icon.png",
"activationEvents": [
"onLanguage:cpp",
"onLanguage:c",
"onCommand:cpp-checker.cppcheck",
"onCommand:cpp-checker.cppcheckdir",
"onCommand:cpp-checker.cppcheckcmd",
"onCommand:cpp-checker.cpplint",
"onCommand:cpp-checker.cpplintdir",
"onCommand:cpp-checker.cpplintcmd"
],
"main": "./src/extension.js",
"contributes": {
"commands": [
{
"command": "cpp-checker.cppcheck",
"title": "cppcheck-file"
},
{
"command": "cpp-checker.cppcheckdir",
"title": "cppcheck-dir"
},
{
"command": "cpp-checker.cppcheckcmd",
"title": "cppcheck-cmd"
},
{
"command": "cpp-checker.cpplint",
"title": "cpplint-file"
},
{
"command": "cpp-checker.cpplintdir",
"title": "cpplint-dir"
},
{
"command": "cpp-checker.cpplintcmd",
"title": "cpplint-cmd"
}
],
"keybindings": [
{
"command": "cpp-checker.cppcheck",
"key": "ctrl+q",
"when": "editorTextFocus"
},
{
"command": "cpp-checker.cppcheckdir",
"key": "ctrl+shift+q",
"when": "editorTextFocus"
},
{
"command": "cpp-checker.cpplint",
"key": "ctrl+w",
"when": "editorTextFocus"
},
{
"command": "cpp-checker.cpplintdir",
"key": "ctrl+shift+w",
"when": "editorTextFocus"
}
],
"menus": {
"editor/context": [
{
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == h || resourceLangId == hpp",
"command": "cpp-checker.cppcheck",
"group": "2_ccl@1"
},
{
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == h || resourceLangId == hpp",
"command": "cpp-checker.cppcheckdir",
"group": "2_ccl@2"
},
{
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == h || resourceLangId == hpp",
"command": "cpp-checker.cppcheckcmd",
"group": "2_ccl@3"
},
{
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == h || resourceLangId == hpp",
"command": "cpp-checker.cpplint",
"group": "2_ccl@4"
},
{
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == h || resourceLangId == hpp",
"command": "cpp-checker.cpplintdir",
"group": "2_ccl@5"
},
{
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == h || resourceLangId == hpp",
"command": "cpp-checker.cpplintcmd",
"group": "2_ccl@6"
}
],
"explorer/context": [
{
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == h || resourceLangId == hpp",
"command": "cpp-checker.cppcheck",
"group": "2_iep@1"
},
{
"when": "explorerResourceIsFolder",
"command": "cpp-checker.cppcheckdir",
"group": "2_iep@1"
},
{
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == h || resourceLangId == hpp || explorerResourceIsFolder",
"command": "cpp-checker.cppcheckcmd",
"group": "2_iep@2"
},
{
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == h || resourceLangId == hpp",
"command": "cpp-checker.cpplint",
"group": "2_iep@3"
},
{
"when": "explorerResourceIsFolder",
"command": "cpp-checker.cpplintdir",
"group": "2_iep@3"
},
{
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == h || resourceLangId == hpp || explorerResourceIsFolder",
"command": "cpp-checker.cpplintcmd",
"group": "2_iep@4"
}
]
},
"configuration": {
"type": "object",
"title": "cpp-checker",
"properties": {
"cpp-checker.--enable": {
"type": "boolean",
"default": true,
"description": "Enable or disable the cpp-checker"
},
"cpp-checker.--log": {
"type": "number",
"default": 0,
"enum": [
0,
1,
2,
3,
4
],
"enumDescriptions": [
"OFF",
"Error",
"Warning",
"Info",
"Debug"
]
},
"cpp-checker.cppcheck.--addon=": {
"type": "array",
"default": [],
"examples": [[
"cert",
{
"script": "misra.py",
"args": [
"--rule-texts=/home/user/misra.txt"
]
},
"y2038.py",
"C:\\UsersAdministrator\\hreadsafety.json"
]],
"description": "see ReadMe"
},
"cpp-checker.cppcheck.--customargs=": {
"type": "string",
"default": "",
"description": "customargs"
},
"cpp-checker.cppcheck.--enable": {
"type": "boolean",
"default": true,
"description": "Enable or disable the cppcheck"
},
"cpp-checker.cppcheck.--quick_fix": {
"type": "boolean",
"default": true,
"description": "Whether to enable experimental \"Quick Fix\" feature."
},
"cpp-checker.cppcheck.--onsave": {
"type": "boolean",
"default": true,
"description": "Whether cppcheck is run on save"
},
"cpp-checker.cppcheck.--executable": {
"type": "string",
"default": "cppcheck",
"description": "The path to the cppcheck executable(builtin binaries will be used if empty or run error)."
},
"cpp-checker.cppcheck.--enable=": {
"type": "string",
"default": "warning",
"description": "Enable additional checks. The available ids are: all, warning, style, performance, portability, information, unusedFunction, missingInclide"
},
"cpp-checker.cppcheck.-i ": {
"type": "array",
"examples": [[
"build",
"src/utils"
]],
"default": [],
"description": "Give a source file or source file directory to exclude\r\nfrom the check. This applies only to source files so\r\nheader files included by source files are not matched.\r\nDirectory name is matched to all parts of the path.\r\n auto add base path"
},
"cpp-checker.cppcheck.--includes-file=": {
"type": "string",
"examples": [
"cppcheck_includes.txt"
],
"default": "",
"description": "Specify directory paths to search for included header files in a text file. Add one include path per line. First given path is searched for contained header files first. If paths are relative to source files, this is not needed."
},
"cpp-checker.cppcheck.--inconclusive": {
"type": "boolean",
"default": false,
"description": "Allow that Cppcheck reports even though the analysis is\r\ninconclusive.\r\nThere are false positives with this option. Each result\r\nmust be carefully investigated before you know if it is\r\ngood or bad."
},
"cpp-checker.cppcheck.--inline-suppr": {
"type": "boolean",
"default": true,
"description": "Enable inline suppressions. Use them by placing one or\r\nmore comments, like: '// cppcheck-suppress warningId'\r\non the lines before the warning to suppress."
},
"cpp-checker.cppcheck.-j": {
"type": [
"number",
"null"
],
"default": 4,
"description": "Start <jobs> threads to do the checking simultaneously."
},
"cpp-checker.cppcheck.--language=": {
"type": "string",
"default": "c++",
"enum": [
"c",
"c++"
],
"description": "Forces cppcheck to check all files as the given language. Valid values are: c, c++"
},
"cpp-checker.cppcheck.--platform=": {
"type": "string",
"default": "native",
"enum": [
"unix32",
"unix64",
"win32A",
"win32W",
"win64",
"avr8",
"elbrus-e1cp",
"pic8",
"pic8-enhanced",
"pic16",
"mips32",
"native",
"unspecified"
],
"description": " Specifies platform specific types and sizes."
},
"cpp-checker.cppcheck.--report-progress": {
"type": "boolean",
"default": true,
"enum": [
true
]
},
"cpp-checker.cppcheck.--std_c=": {
"type": "string",
"default": "c89",
"enum": [
"c89",
"c99",
"c11"
]
},
"cpp-checker.cppcheck.--std_c++=": {
"type": "string",
"default": "c++03",
"enum": [
"c++03",
"c++11",
"c++14",
"c++17",
"c++20"
]
},
"cpp-checker.cppcheck.--template=": {
"type": "string",
"default": "{file}:{line}:{column}: {severity}: CWE-{cwe} {message}:[{id}]",
"enum": [
"{file}:{line}:{column}: {severity}: CWE-{cwe} {message}:[{id}]"
]
},
"cpp-checker.cppcheck.--max-ctu-depth=": {
"type": [
"number",
"null"
],
"default": 2,
"description": "Max depth in whole program analysis. The default value\r\nis 2. A larger value will mean more errors can be found\r\nbut also means the analysis will be slower."
},
"cpp-checker.cppcheck.--suppress=": {
"type": "array",
"default": [
"unmatchedSuppression",
"missingIncludeSystem"
],
"description": "--suppress=<spec> Suppress warnings that match <spec>. The format of\r\n <spec> is:\r\n [error id]:[filename]:[line]\r\n The [filename] and [line] are optional. If [error id]\r\n is a wildcard '*', all error ids match."
},
"cpp-checker.cppcheck.--suppressions-list=": {
"type": "string",
"default": "",
"description": "--suppressions-list=<file>\r\n Suppress warnings listed in the file. Each suppression\r\n is in the same format as <spec> above."
},
"cpp-checker.cppcheck.-D": {
"type": "array",
"examples": [[
"DUBUG",
"WIN32"
]],
"default": [],
"description": "Define preprocessor symbol. Unless --max-configs or\r\n--force is used, Cppcheck will only check the given\r\nconfiguration when -D is used.\r\nExample: [DEBUG,WIN32]."
},
"cpp-checker.cppcheck.-I ": {
"type": "array",
"examples": [[
"src/lib",
"src/utils"
]],
"default": [],
"description": "Give paths to search for include files\r\n auto add base path"
},
"cpp-checker.cppcheck.-U": {
"type": "array",
"examples": [[
"DUBUG",
"WIN32"
]],
"default": [],
"description": " Undefine preprocessor symbol. Use -U to explicitly\r\nhide certain #ifdef <ID> code paths from checking.\t\nExample: '[DEBUG,WIN32]'"
},
"cpp-checker.cpplint.--enable": {
"type": "boolean",
"default": true,
"description": "Enable or disable the cpplint"
},
"cpp-checker.cpplint.--customargs=": {
"type": "string",
"default": "",
"description": "customargs"
},
"cpp-checker.cpplint.--executable": {
"type": "string",
"default": "cpplint",
"description": "The path to the cpplint executable(builtin binaries will be used if empty or run error)."
},
"cpp-checker.cpplint.--lintdir=": {
"type": "string",
"default": "",
"description": "The param for lint dir."
},
"cpp-checker.cpplint.--quick_fix": {
"type": "boolean",
"default": true,
"description": "Whether to enable experimental \"Quick Fix\" feature."
},
"cpp-checker.cpplint.--onsave": {
"type": "boolean",
"default": true,
"description": "Whether cpplint is run on save"
},
"cpp-checker.cpplint.--verbose=": {
"type": "number",
"default": 1,
"enum": [
0,
1,
2,
3,
4,
5
],
"description": "verbose=#\r\n Specify a number 0-5 to restrict errors to certain verbosity levels.\r\n Errors with lower verbosity levels have lower confidence and are more\r\n likely to be false positives."
},
"cpp-checker.cpplint.--output=": {
"type": "string",
"default": "eclipse",
"enum": [
"eclipse"
]
},
"cpp-checker.cpplint.--filter=": {
"type": "string",
"default": "",
"description": "filter=-x,+y,...\r\n Specify a comma-separated list of category-filters to apply: only\r\n error messages whose category names pass the filters will be printed.\r\n (Category names are printed with the message and look like\r\n \"[whitespace/indent]\".) Filters are evaluated left to right.\r\n \"-FOO\" and \"FOO\" means \"do not print categories that start with FOO\".\r\n \"+FOO\" means \"do print categories that start with FOO\".\r\n\r\n Examples: -whitespace,+whitespace/braces\r\n whitespace,runtime/printf,+runtime/printf_format\r\n -,+build/include_what_you_use\r\n\r\n To see a list of all the categories used in cpplint, pass no arg:\r\n --filter="
},
"cpp-checker.cpplint.--counting=": {
"type": "string",
"default": "detailed",
"enum": [
"total",
"toplevel",
"detailed",
""
],
"description": "counting=total|toplevel|detailed\r\n The total number of errors found is always printed. If\r\n 'toplevel' is provided, then the count of errors in each of\r\n the top-level categories like 'build' and 'whitespace' will\r\n also be printed. If 'detailed' is provided, then a count\r\n is provided for each category like 'build/class'."
},
"cpp-checker.cpplint.--root=": {
"type": "string",
"default": "",
"description": "root=subdir\r\n The root directory used for deriving header guard CPP variable.\r\n This directory is relative to the top level directory of the repository\r\n which by default is determined by searching for a directory that contains\r\n .git, .hg, or .svn but can also be controlled with the --repository flag.\r\n If the specified directory does not exist, this flag is ignored.\r\n\r\n Examples:\r\n Assuming that src is the top level directory of the repository (and\r\n cwd=top/src), the header guard CPP variables for\r\n src/chrome/browser/ui/browser.h are:\r\n\r\n No flag => CHROME_BROWSER_UI_BROWSER_H_\r\n --root=chrome => BROWSER_UI_BROWSER_H_\r\n --root=chrome/browser => UI_BROWSER_H_\r\n --root=.. => SRC_CHROME_BROWSER_UI_BROWSER_H_"
},
"cpp-checker.cpplint.--repository=": {
"type": "string",
"default": "",
"description": "repository=path\r\n The top level directory of the repository, used to derive the header\r\n guard CPP variable. By default, this is determined by searching for a\r\n path that contains .git, .hg, or .svn. When this flag is specified, the\r\n given path is used instead. This option allows the header guard CPP\r\n variable to remain consistent even if members of a team have different\r\n repository root directories (such as when checking out a subdirectory\r\n with SVN). In addition, users of non-mainstream version control systems\r\n can use this flag to ensure readable header guard CPP variables.\r\n\r\n Examples:\r\n Assuming that Alice checks out ProjectName and Bob checks out\r\n ProjectName/trunk and trunk contains src/chrome/ui/browser.h, then\r\n with no --repository flag, the header guard CPP variable will be:\r\n\r\n Alice => TRUNK_SRC_CHROME_BROWSER_UI_BROWSER_H_\r\n Bob => SRC_CHROME_BROWSER_UI_BROWSER_H_\r\n\r\n If Alice uses the --repository=trunk flag and Bob omits the flag or\r\n uses --repository=. then the header guard CPP variable will be:\r\n\r\n Alice => SRC_CHROME_BROWSER_UI_BROWSER_H_\r\n Bob => SRC_CHROME_BROWSER_UI_BROWSER_H_"
},
"cpp-checker.cpplint.--linelength=": {
"type": [
"number",
"null"
],
"default": 120,
"description": "linelength=digits\r\n This is the allowed line length for the project. The default value is\r\n 80 characters.\r\n\r\n Examples:\r\n --linelength=120"
},
"cpp-checker.cpplint.--headers=": {
"type": "string",
"default": "hxx,h++,hh,h,cuh,hpp",
"description": "headers=x,y,...\r\n The header extensions that cpplint will treat as .h in checks. Values are\r\n automatically added to --extensions list.\r\n (by default, only files with extensions {'hxx', 'h++', 'hh', 'h', 'cuh', 'hpp'} will be assumed to be hea\r\n\r\n Examples:\r\n --headers=hxx,h++,hh,h,cuh,hpp\r\n --headers=hpp,hxx\r\n --headers=hpp"
},
"cpp-checker.cpplint.--recursive": {
"type": "boolean",
"default": true,
"description": "Search for files to lint recursively. Each directory given in the list\r\nof files to be linted is replaced by all files that descend from that\r\ndirectory. Files with extensions not in the valid extensions list are\r\nexcluded."
},
"cpp-checker.cpplint.--exclude=": {
"type": "array",
"examples": [[
"build",
"src/utils"
]],
"default": [],
"description": "exclude=path\r\n Exclude the given path from the list of files to be linted. Relative\r\n paths are evaluated relative to the current directory and shell globbing\r\n is performed. This flag can be provided multiple times to exclude\r\n multiple files.\r\n\r\n Examples:'[\"one.cc\",\"build\",\"test/*.cc\"]'"
},
"cpp-checker.cpplint.--extensions=": {
"type": "string",
"default": "hxx,h++,cxx,cc,hh,h,cpp,cuh,c,hpp,c++,cu",
"description": "extensions=extension,extension,...\r\n The allowed file extensions that cpplint will check\r\n\r\nExamples:\r\n --extensions=hxx,h++,cxx,cc,hh,h,cpp,cuh,c,hpp,c++,cu"
},
"cpp-checker.cpplint.--includeorder=": {
"type": "string",
"default": "",
"description": "includeorder=default|standardcfirst\r\n For the build/include_order rule, the default is to blindly assume angle\r\n bracket includes with file extension are c-system-headers (default),\r\n even knowing this will have false classifications.\r\n The default is established at google.\r\n standardcfirst means to instead use an allow-list of known c headers and\r\n treat all others as separate group of \"other system headers\". The C headers\r\n included are those of the C-standard lib and closely related ones."
}
}
}
},
"scripts": {
"lint": "eslint .",
"pretest": "npm run lint",
"test": "node ./test/runTest.js"
},
"devDependencies": {
"@types/vscode": "^1.52.0",
"@types/glob": "^7.1.3",
"@types/mocha": "^8.0.4",
"@types/node": "^12.11.7",
"eslint": "^7.19.0",
"glob": "^7.1.6",
"mocha": "^8.2.1",
"typescript": "^4.1.3",
"vscode-test": "^1.5.0"
},
"repository": {
"type": "git",
"url": "https://github.com/eBikeLabs/cpp-checker"
},
"bugs": {
"url": "https://github.com/eBikeLabs/cpp-checker/issues"
},
"license": "MIT"
}