-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Search before asking
- I had searched in the issues and found no similar issues.
Description
Before the commit #9305 , if we use clang-format to format our codebase, the clang-format sorts the includes.
#9305 claims that there are some compilation errors occurring after we sort the includes in our codebase. Generally speaking, it is right due to the conditional includes (some includes must be put after others, see google code style). However, the number of these exceptions is small, we can treat them case by case.
There are some approaches to handle these exceptions:
- Exclude the whole file - Adding it to
.clang-format-ignore - Exclude some regions in the file - Please refer to Clang-Format Style Options
All in all, it is very helpful if we can unify the order of includes. After investigation, the compilation errors was caused by be/src/service/brpc.h. In brpc.h, the service/brpc_conflict.h must be included first.
Solution
- Revert the setting of
.clang-format - Fix the compilation errors.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels