Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
183 lines (183 loc) · 7.9 KB
/
Copy pathpackage.json
File metadata and controls
183 lines (183 loc) · 7.9 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
{
"name": "cppcheck-official",
"displayName": "Cppcheck Official",
"description": "A Visual Studio Code extension that runs cppcheck on C/C++ files when they are opened, saved or switched to. Supported by the Cppcheck team.",
"version": "1.0.16",
"engines": {
"vscode": "^1.96.0"
},
"author": "David Ramnerö <david.ramnero@cppchecksolutions.com>",
"repository": {
"type": "git",
"url": "https://github.com/cppchecksolutions/vscode-cppcheck-official"
},
"publisher": "CppcheckSolutionsAB",
"license": "MIT",
"keywords": [
"cppcheck",
"linting",
"c",
"c++",
"analysis",
"diagnostic",
"linter"
],
"categories": [
"Linters"
],
"icon": "images/icon.png",
"activationEvents": [
"onLanguage:cpp",
"onLanguage:c",
"onLanguage:c++"
],
"main": "./out/extension.js",
"contributes": {
"configuration": [
{
"title": "Cppcheck (General)",
"order": 1,
"properties": {
"cppcheck-official.enable": {
"type": "boolean",
"default": true,
"markdownDescription": "Enable or disable the Cppcheck extension. When disabled, no analysis runs and the warnings of a file are cleared the next time it would have been analysed (when it is opened, saved or switched to)."
},
"cppcheck-official.minSeverity": {
"type": "string",
"enum": [
"info",
"warning",
"error"
],
"default": "info",
"markdownEnumDescriptions": ["Show everything, including `style`, `performance`, `portability` and `information` messages.", "Show warnings and errors.", "Show errors only."],
"markdownDescription": "Minimum severity of the warnings that are shown. This filters what is shown; cppcheck still runs all checks. Can also be changed by clicking **Cppcheck severity** in the status bar. See [Severity filter](https://github.com/cppchecksolutions/vscode-cppcheck-official#severity-filter)."
}
}
},
{
"title": "Cppcheck (Advanced)",
"order": 2,
"properties": {
"cppcheck-official.path": {
"type": "string",
"default": "",
"markdownDescription": "Path to the cppcheck executable, e.g. `C:\\Program Files\\Cppcheck\\cppcheck.exe` on Windows or `/usr/bin/cppcheck` on Linux and macOS. If empty, `cppcheck` from the system PATH is used.\n\nSupports `${workspaceFolder}`, `~`, `./` and `../`, e.g. `${workspaceFolder}/tools/cppcheck`. Other relative paths are relative to the workspace folder. See [Paths](https://github.com/cppchecksolutions/vscode-cppcheck-official#paths)."
},
"cppcheck-official.arguments": {
"type": "string",
"default": "",
"markdownDescription": "Additional command line arguments for cppcheck, separated by spaces, e.g. `--project=build/compile_commands.json --suppress=missingInclude`.\n\nThe extension always adds `--enable=all --inline-suppr --xml`, and some flags depending on whether a project file is used. See [The command line the extension runs](https://github.com/cppchecksolutions/vscode-cppcheck-official#the-command-line-the-extension-runs).\n\nOverridden by `arguments` in `cppcheck.json` in the root of the workspace folder, if present. See [Configuration](https://github.com/cppchecksolutions/vscode-cppcheck-official#configuration).\n\nFor the available arguments, see the Cppcheck manual ([open source](https://cppcheck.sourceforge.io/manual.pdf#page=4) / [Premium](https://files.cppchecksolutions.com/manual.pdf#page=4))."
}
}
}
],
"jsonValidation": [
{
"fileMatch": "/cppcheck.json",
"url": "./schemas/cppcheck.schema.json"
}
],
"walkthroughs": [
{
"id": "cppcheck-official.gettingStarted",
"title": "Get Started with Cppcheck",
"description": "Learn the basics of using cppcheck in VS Code with the official extension",
"steps": [
{
"id": "step1",
"title": "Connect extension to your cppcheck executable",
"description": "Tell the extension where cppcheck is installed. Skip this step if `cppcheck` is on your system PATH.\n[Set path](command:workbench.action.openSettings?%5B%22cppcheck-official.path%22%5D)",
"media": {
"markdown": "walkthrough/path.md"
},
"completionEvents": [
"onSettingChanged:cppcheck-official.path"
]
},
{
"id": "step2",
"title": "Customize settings",
"description": "Pass your own command line arguments to cppcheck, e.g. to suppress warnings or enable Cppcheck Premium checks.\n[Set up arguments](command:cppcheck-official.configureArguments)",
"media": {
"markdown": "walkthrough/arguments.md"
},
"completionEvents": [
"onSettingChanged:cppcheck-official.arguments"
]
},
{
"id": "projectFile",
"title": "Use a project file or cppcheck.json",
"description": "Point cppcheck at a `.cppcheck` project file or `compile_commands.json`, and share the arguments with your team in `cppcheck.json`.\n[Read about project files](https://github.com/cppchecksolutions/vscode-cppcheck-official#project-files)",
"media": {
"markdown": "walkthrough/project.md"
},
"completionEvents": [
"onLink:https://github.com/cppchecksolutions/vscode-cppcheck-official#project-files"
]
},
{
"id": "step3",
"title": "Try out the extension",
"description": "Open a C or C++ file and see the cppcheck warnings in the Problems panel.\n[Open the Problems panel](command:workbench.actions.view.problems)",
"media": {
"markdown": "walkthrough/test.md"
},
"completionEvents": [
"onView:workbench.panel.markers.view"
]
},
{
"id": "handleWarnings",
"title": "Handle warnings",
"description": "Filter warnings by severity in the status bar, and hide or suppress warnings with code actions.\n[Select severity](command:cppcheck-official.selectMinSeverity)",
"media": {
"markdown": "walkthrough/warnings.md"
},
"completionEvents": [
"onCommand:cppcheck-official.selectMinSeverity",
"onCommand:cppcheck-official.hideWarning"
]
},
{
"id": "fullAnalysis",
"title": "Run a full analysis",
"description": "Analyse every file in your project file at once with the Full Analysis button in the status bar. Needs a project file.\n[Read about full analysis](https://github.com/cppchecksolutions/vscode-cppcheck-official#full-analysis)",
"media": {
"markdown": "walkthrough/fullAnalysis.md"
},
"completionEvents": [
"onCommand:cppcheck-official.runFullAnalysis",
"onLink:https://github.com/cppchecksolutions/vscode-cppcheck-official#full-analysis"
]
}
]
}
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src",
"test": "vscode-test"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"@types/vscode": "^1.96.0",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"@vscode/test-cli": "^0.0.15",
"@vscode/test-electron": "^3.1.0",
"eslint": "^9.16.0",
"typescript": "^5.7.2"
},
"dependencies": {
"@types/xml2js": "^0.4.14",
"xml2js": "^0.6.2"
}
}