Add clang-tidy configuration and watch script for improved code quality checks
This commit is contained in:
1 parent
fb273e0f8f
commit
fca0c19207
5 files changed
+197
No files matched your search
Vendored
+64
@@ -69,6 +69,70 @@
|
||||
"command": "cd ${workspaceFolder} && if [ -d build ]; then cmake --build build --target clean; fi && if [ -d build-debug ]; then cmake --build build-debug --target clean; fi",
|
||||
"problemMatcher": [],
|
||||
},
|
||||
{
|
||||
"label": "clang-tidy (all)",
|
||||
"type": "shell",
|
||||
"command": "cd ${workspaceFolder} && mkdir -p .clang-tidy-db && sed 's/-mthumb-interwork//g' compile_commands.json > .clang-tidy-db/compile_commands.json && run-clang-tidy -p .clang-tidy-db '.*\\.(c|cc|cpp|cxx)$' -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/arm-none-eabi/include/c++/15.2.0 -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/arm-none-eabi/include/c++/15.2.0/arm-none-eabi -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/arm-none-eabi/include/c++/15.2.0/backward -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/15.2.0/include -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/15.2.0/include-fixed -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/arm-none-eabi/include",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpp",
|
||||
"fileLocation": "absolute",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|note):\\s+(.*?)(?:\\s+\\[.*\\])?$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "clang-tidy (watch changed)",
|
||||
"type": "shell",
|
||||
"isBackground": true,
|
||||
"command": "cd ${workspaceFolder} && bash tools/clang_tidy_watch.sh",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "cpp",
|
||||
"fileLocation": "absolute",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|note):\\s+(.*?)(?:\\s+\\[.*\\])?$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "^TIDY-WATCH-BEGIN$",
|
||||
"endsPattern": "^TIDY-WATCH-END$"
|
||||
}
|
||||
}
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "run",
|
||||
"type": "shell",
|
||||
|
||||
Reference in new issue
Block a user