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

Andrea Cervesato andrea.cervesato@suse.com
Wed Mar 25 16:34:16 CET 2026


> 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


More information about the ltp mailing list