All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] .gitignore: ignore temporary files from 'bear'
@ 2025-08-27  8:59 Brendan Jackman
  2025-08-29 23:38 ` Nathan Chancellor
  0 siblings, 1 reply; 4+ messages in thread
From: Brendan Jackman @ 2025-08-27  8:59 UTC (permalink / raw)
  To: Nick Desaulniers, Nathan Chancellor, Bill Wendling
  Cc: linux-kernel, Justin Stitt, llvm, Brendan Jackman

Bear [0] is a tool for generating compile_commands.json. For Kbuild,
Bear is not useful, since Kbuild already generates the necessary info
and that can be converted to compile_commands.json by
gen_compile_commads.py.

However, for code in tools/, it's handy. For example, this command
updates compile_commands.json so that clangd code navigation will also
work for the VMA unit tests:

	bear --append -- make -C tools/testing/vma -j

Bear generates some temporary files. These are usually deleted again
but having them show up ephemerally confuses tools that trigger
recompilation on source code changes. Ignore them in Git so that these
tools can tell they aren't source code.

[0]: https://github.com/rizsotto/Bear

Signed-off-by: Brendan Jackman <jackmanb@google.com>
---
 .gitignore | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
index 929054df5212d68a32a1f5ee2b267389fcd1c8db..b07c8c8383bd791e903ce985c14c231cb6928411 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,6 +53,7 @@
 *.tar
 *.xz
 *.zst
+*.tmp
 Module.symvers
 dtbs-list
 modules.order
@@ -177,6 +178,9 @@ x509.genkey
 
 # Clang's compilation database file
 /compile_commands.json
+# Temporary files created by 'bear', a tool used for generating
+# compile_commands.json for non-Kbuild code.
+*.events.json
 
 # Documentation toolchain
 sphinx_*/

---
base-commit: fab1beda7597fac1cecc01707d55eadb6bbe773c
change-id: 20250827-master-23458abb102d

Best regards,
-- 
Brendan Jackman <jackmanb@google.com>


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

end of thread, other threads:[~2025-09-01 11:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27  8:59 [PATCH] .gitignore: ignore temporary files from 'bear' Brendan Jackman
2025-08-29 23:38 ` Nathan Chancellor
2025-08-30 19:25   ` Nicolas Schier
2025-09-01 11:29     ` Brendan Jackman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.