[LTP] [PATCH v2] Add cglangd specific files to gitignore

Jan Polensky japo@linux.ibm.com
Wed Mar 25 16:10:32 CET 2026


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


More information about the ltp mailing list