.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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
On Thu, Jun 5, 2025 at 8:14 PM Andrii Nakryiko <andrii@kernel.org> wrote: > > # Clang's compilation database file > -/compile_commands.json > +compile_commands.json Should it be removed from `tools/power/cpupower/.gitignore` then? Thanks! Cheers, Miguel
On Fri, Jun 6, 2025 at 12:41 PM Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote: > > On Thu, Jun 5, 2025 at 8:14 PM Andrii Nakryiko <andrii@kernel.org> wrote: > > > > # Clang's compilation database file > > -/compile_commands.json > > +compile_commands.json > > Should it be removed from `tools/power/cpupower/.gitignore` then? yep, can do that in the same patch > > Thanks! > > Cheers, > Miguel
On Thu, Jun 05, 2025 at 11:14:26AM -0700, Andrii Nakryiko 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. > > [0] https://github.com/rizsotto/Bear > > Suggested-by: Eduard Zingerman <eddyz87@gmail.com> > Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Sure, I cannot imagine anyone actually wanting to check these in, regardless of where they exists. Reviewed-by: Nathan Chancellor <nathan@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 >
© 2016 - 2025 Red Hat, Inc.