Skip to content

Commit f7cc3ca

Browse files
anakryikonathanchance
authored andcommitted
.gitignore: ignore compile_commands.json globally
compile_commands.json can be used with clangd to enable language server protocol-based assistance. For kernel itself this can be built with scripts/gen_compile_commands.py, but other projects (e.g., libbpf, or BPF selftests) can benefit from their own compilation database file, which can be generated successfully using external tools, like bear [0]. So, instead of adding compile_commands.json to .gitignore in respective individual projects, let's just ignore it globally anywhere in Linux repo. While at it, remove exactly such a local .gitignore rule under tools/power/cpupower. [0] https://github.com/rizsotto/Bear Reviewed-by: Nathan Chancellor <nathan@kernel.org> Suggested-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20250606214840.3165754-1-andrii@kernel.org Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent 8f5ae30 commit f7cc3ca

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ x509.genkey
176176
*.kdev4
177177

178178
# Clang's compilation database file
179-
/compile_commands.json
179+
compile_commands.json
180180

181181
# Documentation toolchain
182182
sphinx_*/

tools/power/cpupower/.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,3 @@ debug/i386/intel_gsic
2727
debug/i386/powernow-k8-decode
2828
debug/x86_64/centrino-decode
2929
debug/x86_64/powernow-k8-decode
30-
31-
# Clang's compilation database file
32-
compile_commands.json

0 commit comments

Comments
 (0)