We have lots of c++ code repos in our project and generally they are structured like this:
some_sw_repo/
|
|-- tools/ (sub-module, common to all projects)
|
|-- .clang-format
I run clang-format at the some_sw_repo/
folder level, but I can't see any way to tell clang-format that the .clang-format
file is in the tools/
sub-folder. So currently I am copying the format file up and then running clang-format and then deleting it again (since I don't want the local copy - we want one copy for all projects).
This is ok, because I can add a make recipe to do this. However there is also a really handy vs-code addon: https://marketplace.visualstudio.com/items?itemName=xaver.clang-format
Which works really well... if the .clang-format file is in the top level.
Is there any way at all to tell clang-format that the .clang-format file is in a specific place?
My version of clang-format is v10.0.0