Skip to content

Commit

Permalink
.gitignore: Add compilation database file and directory
Browse files Browse the repository at this point in the history
The tool 'bear'[1] can be used to generate the C language server protocol
database file while compiling: 'bear -- make -j $(nproc)'

Add the database file into .gitignore as Linux Kernel [2] does.

The clangd will parse the compile_commands.json language metadata into the
.cache directory. Add it for clean git status track.

[1]: https://github.com/rizsotto/Bear
[2]: https://git.kernel.org/torvalds/c/26c4c71bcd9a

Signed-off-by: Haiyue Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
haiyuewa authored and axboe committed Nov 6, 2024
1 parent f837514 commit a27cad8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
/test/*.dmesg
/test/output/

# Clang's compilation database file and directory.
/.cache
/compile_commands.json

config-host.h
config-host.mak
config.log
Expand Down

0 comments on commit a27cad8

Please sign in to comment.