Open justusranvier opened 11 months ago
Usually for one project you should only handle a single .clang-tidy, .clang-format or .clangd file, which you should put in the root of the project. If you handle different .clang-format files for instance, you're not really working "correctly" anyways so the "correct" guideline for a folder structure doesn't apply anyways. For Doxyfile you can actually specify the relative path and put this config anywhere you like (I usually put it in docs/doxygen/myconfig.conf and set the INPUT variable in there to ../../src and ../../include or the like)
I can not understand what line of reasoning would lead one to conclude that it's only correct to have a single .clang-tidy or .clang-format file per project.
Why do are these tools coded to allow configuration files to inherit and extend/modify settings from configuration files in parent directories if that's an incorrect use of them?
You make it sound as if it's the sole intent of these files to be used that way. It's a feature for a use case that shouldn't have been applicable, because it's ill advised to make exceptions for one portion of the code to keep it consistent.
Other than that, use your own discretion. If you think you need that, then don't let me or this guide tell you what to do. If you think you should have an extra clang-tidy in other directories then go ahead, but it's not a typical use case nor would I advice for it.
Section 3.3 of the specification states "No non-source-code files will should be placed or generated in any subdirectories of a source directory." however this conflicts with the requirements of some development tools.
In particular, files such as
.clang-tidy
,.clang-format
andDoxyfile
must be placed in particular locations in the source tree relative to files to which they apply.It seems like the intent here is to exclude binary artifacts but the wording goes beyond that.