Re: [PATCH v2] .gitignore: ignore compile_commands.json globally

From: Miguel Ojeda
Date: Sat Jun 07 2025 - 05:27:33 EST


On Fri, Jun 6, 2025 at 11:48 PM Andrii Nakryiko <andrii@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxx>
> Suggested-by: Eduard Zingerman <eddyz87@xxxxxxxxx>
> Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>

Reviewed-by: Miguel Ojeda <ojeda@xxxxxxxxxx>

Thanks!

Cheers,
Miguel