From 1012d8de776441520d281c1aedba005cd30371d7 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Tue, 18 Aug 2020 00:28:37 +0100 Subject: [PATCH] add clang-tidy vscode extension --- .vscode/extensions.json | 6 +++++- .vscode/settings.json | 8 ++++++++ .vscode/tasks.json | 8 ++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 0c8509af8c..47f7416c04 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,5 +2,9 @@ "recommendations": [ "ms-vscode.cpptools", "nanaian.vscode-star-rod", - ], + "notskm.clang-tidy", + ], + "unwantedRecommendations": [ + "llvm-vs-code-extensions.vscode-clangd", + ], } diff --git a/.vscode/settings.json b/.vscode/settings.json index 571f956be5..33ac05f0f5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,4 +4,12 @@ "files.eol": "\n", "files.insertFinalNewline": true, "editor.rulers": [120], + "clang-tidy.compilerArgs": [ + "-fno-builtin", + "-std=gnu89", + "-Iinclude", + "-Iinclude/PR", + "-Isrc", + "-D_LANGUAGE_C", + ], } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 7ea26fe0e7..1b8575b6cd 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -9,7 +9,7 @@ { "fileLocation": ["relative", "${workspaceFolder}"], "pattern": { - "regexp": "^(src\\/.*):(\\d+):\\s+(warning|error):\\s+(.*)$", + "regexp": "^(src\\/.*|include\\/.*):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "severity": 3, @@ -20,7 +20,7 @@ "fileLocation": ["relative", "${workspaceFolder}"], "severity": "error", "pattern": { - "regexp": "^(src\\/.*):(\\d+):\\s+(?!warning|\\()(.*)$", + "regexp": "^(src\\/.*|include\\/.*):(\\d+):\\s+(?!warning|\\()(.*)$", "file": 1, "line": 2, "message": 3, @@ -44,7 +44,7 @@ "activeOnStart": true, }, "pattern": { - "regexp": "^(src\\/.*):(\\d+):\\s+(warning|error):\\s+(.*)$", + "regexp": "^(src\\/.*|include\\/.*):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "severity": 3, @@ -58,7 +58,7 @@ }, "severity": "error", "pattern": { - "regexp": "^(src\\/.*):(\\d+):\\s+(?!warning|\\()(.*)$", + "regexp": "^(src\\/.*|include\\/.*):(\\d+):\\s+(?!warning|\\()(.*)$", "file": 1, "line": 2, "message": 3,