public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] Add cglangd specific files to gitignore
@ 2026-03-25 10:51 Andrea Cervesato
  2026-03-25 15:10 ` Jan Polensky
  0 siblings, 1 reply; 3+ messages in thread
From: Andrea Cervesato @ 2026-03-25 10:51 UTC (permalink / raw)
  To: Linux Test Project

From: Andrea Cervesato <andrea.cervesato@suse.com>

Add rule to ignore clangd LSP configuration from local repository.

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
Clangd is extensively used by IDEs and generic LSP wrappers to setup
clangd configuration. This patch removes it from gitignore so we can
safely avoid it gets into the patch-set when it's sent.
---
Changes in v2:
- add compile_commands.json
- Link to v1: https://lore.kernel.org/r/20260325-compile_flags_gitignore-v1-1-b0de37eeacc8@suse.com
---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitignore b/.gitignore
index 24f4a4ea834e0b919e640e879fe5e5b5d7aec466..139ecded5fa0a47a12b97eac6ebf432cbe5e5c11 100644
--- a/.gitignore
+++ b/.gitignore
@@ -60,3 +60,5 @@ patches/
 logfile.*
 
 /utils/benchmark/ebizzy-0.3/ebizzy
+/compile_flags.txt
+/compile_commands.json

---
base-commit: b874b6a264cf4f343c17d543ebe4ff91fbb89042
change-id: 20260325-compile_flags_gitignore-c12d8f65ef2d

Best regards,
-- 
Andrea Cervesato <andrea.cervesato@suse.com>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH v2] Add cglangd specific files to gitignore
  2026-03-25 10:51 [LTP] [PATCH v2] Add cglangd specific files to gitignore Andrea Cervesato
@ 2026-03-25 15:10 ` Jan Polensky
  2026-03-25 15:34   ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Polensky @ 2026-03-25 15:10 UTC (permalink / raw)
  To: Andrea Cervesato, Linux Test Project

On Wed, Mar 25, 2026 at 11:51:45AM +0100, Andrea Cervesato wrote:
> From: Andrea Cervesato <andrea.cervesato@suse.com>
>
> Add rule to ignore clangd LSP configuration from local repository.
>
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
> Clangd is extensively used by IDEs and generic LSP wrappers to setup
> clangd configuration. This patch removes it from gitignore so we can
> safely avoid it gets into the patch-set when it's sent.
> ---
> Changes in v2:
> - add compile_commands.json
> - Link to v1: https://lore.kernel.org/r/20260325-compile_flags_gitignore-v1-1-b0de37eeacc8@suse.com
> ---
>  .gitignore | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/.gitignore b/.gitignore
> index 24f4a4ea834e0b919e640e879fe5e5b5d7aec466..139ecded5fa0a47a12b97eac6ebf432cbe5e5c11 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -60,3 +60,5 @@ patches/
>  logfile.*
>
>  /utils/benchmark/ebizzy-0.3/ebizzy
> +/compile_flags.txt
> +/compile_commands.json
Hi Andrea,

thanks for spinning v2 so quickly!

Small nit: with the leading '/', /compile_commands.json only matches in the
repository root. However compile_commands.json is often generated in
build/subdirectories (depending on where the build is run). If the goal is to
prevent accidental inclusion anywhere, the pattern should be unanchored, e.g.:

  compile_commands.json

(or equivalently **/compile_commands.json).

I can reproduce this by generating it from a subdir (e.g. via bear), which
produces ./compile_commands.json there.

	bear -- make

Thanks,
Jan
>
> ---
> base-commit: b874b6a264cf4f343c17d543ebe4ff91fbb89042
> change-id: 20260325-compile_flags_gitignore-c12d8f65ef2d
>
> Best regards,
> --
> Andrea Cervesato <andrea.cervesato@suse.com>
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH v2] Add cglangd specific files to gitignore
  2026-03-25 15:10 ` Jan Polensky
@ 2026-03-25 15:34   ` Andrea Cervesato via ltp
  0 siblings, 0 replies; 3+ messages in thread
From: Andrea Cervesato via ltp @ 2026-03-25 15:34 UTC (permalink / raw)
  To: Jan Polensky; +Cc: Linux Test Project

> Small nit: with the leading '/', /compile_commands.json only matches in the
> repository root. However compile_commands.json is often generated in
> build/subdirectories (depending on where the build is run). If the goal is to
> prevent accidental inclusion anywhere, the pattern should be unanchored, e.g.:
> 
>   compile_commands.json
> 
> (or equivalently **/compile_commands.json).
> 
> I can reproduce this by generating it from a subdir (e.g. via bear), which
> produces ./compile_commands.json there.
> 
> 	bear -- make
> 
> Thanks,
> Jan

I see, I never used bear honestly, so this might be a bit tricky for me.
But I see the value and the correlation with clangd, so we can safely add

**/compile_commands.json

Will send an another patch.

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2026-03-25 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 10:51 [LTP] [PATCH v2] Add cglangd specific files to gitignore Andrea Cervesato
2026-03-25 15:10 ` Jan Polensky
2026-03-25 15:34   ` Andrea Cervesato via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox