* [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
* Re: [PATCH] .gitignore: ignore compile_commands.json globally
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
1 sibling, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2025-06-06 17:40 UTC (permalink / raw)
To: Andrii Nakryiko
Cc: linux-kernel, masahiroy, ojeda, bpf, kernel-team,
Eduard Zingerman
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] .gitignore: ignore compile_commands.json globally
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
1 sibling, 1 reply; 4+ messages in thread
From: Miguel Ojeda @ 2025-06-06 19:41 UTC (permalink / raw)
To: Andrii Nakryiko
Cc: linux-kernel, masahiroy, ojeda, nathan, bpf, kernel-team,
Eduard Zingerman
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] .gitignore: ignore compile_commands.json globally
2025-06-06 19:41 ` Miguel Ojeda
@ 2025-06-06 21:43 ` Andrii Nakryiko
0 siblings, 0 replies; 4+ messages in thread
From: Andrii Nakryiko @ 2025-06-06 21:43 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Andrii Nakryiko, linux-kernel, masahiroy, ojeda, nathan, bpf,
kernel-team, Eduard Zingerman
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
^ permalink raw reply [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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).