Enforce project wide #include order#911
Conversation
e4ebffa to
59c6676
Compare
|
Didn't we want to keep the clang format file as simple and as standard as possible? Is this really worth it? |
|
I've been asked to reorder includes in multiple PRs, about half the files in this repository contain some form of error regarding our current I just want The enforced order is of cause up for debate, if you want to stick with |
|
Who asks you to reorder? You should not need to do anything style related that is not mentioned here: https://villas.fein-aachen.org/docs/node/development/contributing/. This mentions nothing about include order. |
|
I think we agreed in the past to follow the LLVM/Clang coding standards. The minimal clang-format configuraiton which we had in the past is not sufficient, as it can not identify our local headers (e.g. So, believe extending the clang-format config is justified as long as we stick with our goal of following the Clang/LLVM coding standard. |
|
The LLVM I deviate from these on the "main" header of a source file. I've found that these heuristics determined e.g. |
Signed-off-by: Philipp Jungkamp <philipp.jungkamp@rwth-aachen.de>
Signed-off-by: Philipp Jungkamp <philipp.jungkamp@rwth-aachen.de>
Great idea to automate/standardize to reduce PR review workload and frustrating comments. |
|
We have a new pending PR by @pjungkamp to automate include ordering fixes with clang-tidy. Looking forward to this |
This instructs
clang-formatto enforce a uniform#includeorder across all files. See https://clang.llvm.org/docs/ClangFormatStyleOptions.html#includecategories^<villas/: headers^<[[:lower:]]+>$: standard library headers^<.*>$: other system headers^".*"$: local headers