LLVM style puts both gtest and gmock to the end of the include list.
But llvm-include-order-check was only moving gtest headers to the end, resulting
in a false tidy-warning.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for fixing this, been bugging me for a while.
clang-tools-extra/test/clang-tidy/checkers/llvm-include-order.cpp | ||
---|---|---|
1 | Would it be wise to specify a format style here to ensure they align. Better yet 2 run lines, one that runs clang-tidy with no format, the other specifies a format. |
clang-tools-extra/test/clang-tidy/checkers/llvm-include-order.cpp | ||
---|---|---|
1 | ah sorry, i missed this comment :/ i am not sure how the formatting vs. generated edits interact. is it enough to have --format-style=LLVM and ensure the run lines produce the same ordering? |
clang-tools-extra/test/clang-tidy/checkers/llvm-include-order.cpp | ||
---|---|---|
1 | Just noticed they still don't seem to sync up, but thats because llvm-include-order doesn't move the first include in a file. Could argue that's a bug and instead should use a heuristic based on the translation unit name and header name. |
Would it be wise to specify a format style here to ensure they align. Better yet 2 run lines, one that runs clang-tidy with no format, the other specifies a format.