All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] .gitignore: ignore compile_commands.json globally
@ 2025-06-05 18:14 Andrii Nakryiko
  2025-06-06 17:40 ` Nathan Chancellor
  2025-06-06 19:41 ` Miguel Ojeda
  0 siblings, 2 replies; 4+ messages in thread
From: Andrii Nakryiko @ 2025-06-05 18:14 UTC (permalink / raw)
  To: linux-kernel, masahiroy, ojeda, nathan
  Cc: bpf, kernel-team, Andrii Nakryiko, Eduard Zingerman

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.

  [0] https://github.com/rizsotto/Bear

Suggested-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
---
 .gitignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index bf5ee6e01cd4..451dff66275d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -175,7 +175,7 @@ x509.genkey
 *.kdev4
 
 # Clang's compilation database file
-/compile_commands.json
+compile_commands.json
 
 # Documentation toolchain
 sphinx_*/
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-06 21:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-05 18:14 [PATCH] .gitignore: ignore compile_commands.json globally Andrii Nakryiko
2025-06-06 17:40 ` Nathan Chancellor
2025-06-06 19:41 ` Miguel Ojeda
2025-06-06 21:43   ` Andrii Nakryiko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.