From c9734c94c501d8e450b2afb161b361962015be91 Mon Sep 17 00:00:00 2001 From: LeoLiu-oc Date: Wed, 3 Dec 2025 16:40:39 +0800 Subject: [PATCH] .gitignore: ignore compile_commands.json globally mainline inclusion from mainline-v6.18-rc1 category: feature commit f7cc3caea0005972162813e24892c49f2364f2fd bugzilla: https://gitee.com/openeuler/kernel/issues/IDAGS4 CVE: NA ------------------------------ 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 Suggested-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Reviewed-by: Miguel Ojeda Link: https://lore.kernel.org/r/20250606214840.3165754-1-andrii@kernel.org Signed-off-by: Nathan Chancellor --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index e18bc625d330..25a6f1bd64f7 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,6 @@ all.config # Kdevelop4 *.kdev4 + +# Clang's compilation database file +compile_commands.json \ No newline at end of file -- Gitee