Skip to contentSkip to conversation

.gitignore: Add compilation database file

PATCH In review Toru Komatsu 3 participants 3 messages Jul 24, 2019 – Jul 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 .gitignore: Add compilation database file

This file is used by clangd to use language server protocol. It can be generated at each compile using scripts/gen_compile_commands.py. Therefore it is different depending on the environment and should be ignored.

---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)
.gitignore +3 -0
index 8f5422cba6e2..2030c7a4d2f8 100644
@@ -142,3 +142,6 @@ x509.genkey
 
 # Kdevelop4
 *.kdev4
+
+# Clang's compilation database file
+/compile_commands.json
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 7 lines · Toru Komatsu

This file is used by clangd to use language server protocol. It can be generated at each compile using scripts/gen_compile_commands.py. Therefore it is different depending on the environment and should be ignored.

Thank you again for this patch. We're working on adding clang-tidy checks for the Linux kernel, which will make use of this file soon. Keep yours eyes out for it!
https://reviews.llvm.org/D59963

Quoted 18 lines
---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)
.gitignore +3 -1
index 8f5422cba6e2..2030c7a4d2f8 100644
@@ -142,3 +142,6 @@ x509.genkey
 
 # Kdevelop4
 *.kdev4
+
+# Clang's compilation database file
+/compile_commands.json
--

2.17.1

Signature · 2 lines
Thanks,
~Nick Desaulniers
#2 lore raw
In reply to Toru Komatsu
Quoted 10 lines · Toru Komatsu

This file is used by clangd to use language server protocol. It can be generated at each compile using scripts/gen_compile_commands.py. Therefore it is different depending on the environment and should be ignored.

---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)

Applied to linux-kbuild/fixes. Thanks.

Signature · 2 lines
Best Regards
Masahiro Yamada