mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
Add include categories to .clang-format
This adds 3 rules that clang-format uses when ordering include files: - common.h is assigned priority -1 - Incudes using <> is given priority 1 - Includes using "" is given priority 2 It also disables putting the "main" file first (the .h/.hpp with the same name as the .c/.cpp" #5074 [ci skip]
This commit is contained in:
parent
c418836a87
commit
a36b200dda
1 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,14 @@ AllowShortFunctionsOnASingleLine: Empty
|
|||
BreakBeforeBraces: Allman
|
||||
ColumnLimit: '128'
|
||||
Cpp11BracedListStyle: 'false'
|
||||
IncludeCategories:
|
||||
- Regex: '^"(\./)*common\.h"$'
|
||||
Priority: -1
|
||||
- Regex: '^<.*>$'
|
||||
Priority: 1
|
||||
- Regex: '^".*"$'
|
||||
Priority: 2
|
||||
IncludeIsMainRegex: 'false'
|
||||
IndentWidth: '4'
|
||||
PointerAlignment: Middle
|
||||
SortIncludes: 'true'
|
||||
|
|
Loading…
Reference in a new issue