From: Andrii Nakryiko Date: Fri, 6 Jun 2025 21:48:40 +0000 (-0700) Subject: .gitignore: ignore compile_commands.json globally X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f7cc3caea0005972162813e24892c49f2364f2fd;p=users%2Fhch%2Fmisc.git .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 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 --- diff --git a/.gitignore b/.gitignore index 929054df5212..86a1ba0d9035 100644 --- a/.gitignore +++ b/.gitignore @@ -176,7 +176,7 @@ x509.genkey *.kdev4 # Clang's compilation database file -/compile_commands.json +compile_commands.json # Documentation toolchain sphinx_*/ diff --git a/tools/power/cpupower/.gitignore b/tools/power/cpupower/.gitignore index 5113d5a7aee0..7677329c42a6 100644 --- a/tools/power/cpupower/.gitignore +++ b/tools/power/cpupower/.gitignore @@ -27,6 +27,3 @@ debug/i386/intel_gsic debug/i386/powernow-k8-decode debug/x86_64/centrino-decode debug/x86_64/powernow-k8-decode - -# Clang's compilation database file -compile_commands.json