Skip to content

Commit 3dd0a87

Browse files
authored
vscode: add target for contrib compdb (envoyproxy#22710)
Signed-off-by: Loong <[email protected]>
1 parent 5163f3e commit 3dd0a87

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.vscode/tasks.json

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
"type": "shell",
2727
"command": "tools/vscode/refresh_compdb.sh",
2828
"problemMatcher": []
29+
},
30+
{
31+
"label": "Refresh Compilation Database Exclude Contrib",
32+
"type": "shell",
33+
"command": "EXCLUDE_CONTRIB=true tools/vscode/refresh_compdb.sh",
34+
"problemMatcher": []
2935
}
3036
]
3137
}

tools/vscode/refresh_compdb.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
bazel_or_isk=bazelisk
66
command -v bazelisk &> /dev/null || bazel_or_isk=bazel
77

8+
[[ -z "${EXCLUDE_CONTRIB}" ]] || opts="--exclude_contrib"
9+
810
# Setting TEST_TMPDIR here so the compdb headers won't be overwritten by another bazel run
9-
TEST_TMPDIR=${BUILD_DIR:-/tmp}/envoy-compdb tools/gen_compilation_database.py --vscode --bazel=$bazel_or_isk --exclude_contrib
11+
TEST_TMPDIR=${BUILD_DIR:-/tmp}/envoy-compdb tools/gen_compilation_database.py --vscode --bazel=$bazel_or_isk ${opts}
1012

1113
# Kill clangd to reload the compilation database
1214
pkill clangd || :

0 commit comments

Comments
 (0)