Skip to contentSkip to conversation

Add compile_flags.txt to gitignore file

PATCH Superseded Andrea Cervesato 4 participants 4 messages Mar 25

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add compile_flags.txt to gitignore file

From: Andrea Cervesato <[email protected]>

Add rule to ignore clangd LSP configuration from local repository.

---
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.

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index 24f4a4ea834e0b919e640e879fe5e5b5d7aec466..6cd409489f266c4805dcf4633957892b10ea032a 100644
@@ -60,3 +60,4 @@ patches/
 logfile.*
 
 /utils/benchmark/ebizzy-0.3/ebizzy
+/compile_flags.txt

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

Best regards,

Signature · 5 lines
Andrea Cervesato <[email protected]>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Acked-by on v1 1/1
#1 lore raw

Hi Andrea,

Quoted 1 line

Add rule to ignore clangd LSP configuration from local repository.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
In reply to Andrea Cervesato
Quoted 18 lines

From: Andrea Cervesato <[email protected]>

Add rule to ignore clangd LSP configuration from local repository.

---
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.

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +0 -0
index 24f4a4ea834e0b919e640e879fe5e5b5d7aec466..6cd409489f266c4805dcf4633957892b10ea032a 100644

.gitignore patches/ · line 63

Quoted 4 lines
.gitignore +1 -0
@@ -60,3 +60,4 @@ patches/
 logfile.*
 
 /utils/benchmark/ebizzy-0.3/ebizzy
+/compile_flags.txt

Hi Andrea,

thanks for the patch!

One thought: compile_commands.json (the compilation database) is also commonly generated locally (e.g. with bear, compiledb), and not necessarily in the repository root (often in a build directory). Since the intent here is to prevent accidental inclusion in patch series, would it make sense to ignore that filename as well?

In .gitignore we could do this without anchoring to the repo root, e.g.:
compile_commands.json

Thanks & best regards,
Jan

Quoted 12 lines

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

Best regards,
--
Andrea Cervesato <[email protected]>

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

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw

Hi Jan,

Quoted 5 lines

One thought: compile_commands.json (the compilation database) is also commonly generated locally (e.g. with bear, compiledb), and not necessarily in the repository root (often in a build directory). Since the intent here is to prevent accidental inclusion in patch series, would it make sense to ignore that filename as well?

I think it's a good idea, thanks. Will send v2.

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp