Grigorii Nazarov <whitecrow...@gmail.com> writes: > On Thursday, June 20, 2024 9:52:07 PM GMT+3 Aaron Conole wrote: >> Why is this file existing? Maybe it would be better to generate the >> compile_commands.json in automake? Or generate it via the makefile? > I'm not checking in the file. It's local configuration file, used by clangd, > which is clang-based language server used by IDEs like Visual Studio Code. It > shouldn't be generated by project files and strictly speaking is not part of > a > project in the first place. I found some other local files being mentioned in > .gitignore, and thus considered adding this one. In general it's a common > practice to gitignore files like that. I can work it out differently > if it's not > to be here.
My understanding is that the compile_flags.txt is editor / clangd generated when there is no compile_commands.json file. My suggestion is to add the relevant code to the makefile to generate the compile_commands.json file, and then add that to the gitignore as well. The reason is that after reading quickly on it, I see that the compile_commands.json file supposedly can accommodate per-file flags, where as compile_flags.txt cannot. It seems that having this additional support would be quite useful, and I don't think it would be too difficult to add? At least from documentation here: https://github.com/Sarcasm/notes/blob/master/dev/compilation-database.rst#clang Do you think this would be okay for you to do? >> > .gitignore | 1 + >> > 1 file changed, 1 insertion(+) >> > >> > diff --git a/.gitignore b/.gitignore >> > index 26ed8d3d0..3c7250159 100644 >> > --- a/.gitignore >> > +++ b/.gitignore >> > @@ -79,3 +79,4 @@ testsuite.tmp.orig >> > >> > /Documentation/_build >> > /.venv >> > /cxx-check >> > >> > +/compile_flags.txt _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev