Browse Source

Update include order in .clang-format

We generally want system headers included above project ones.
In one case <linux/limits.h> needs to be above other system headers.
Ahsan Fayaz 1 year ago
parent
commit
f48c58f34c
1 changed files with 4 additions and 6 deletions
  1. 4 6
      .clang-format

+ 4 - 6
.clang-format

@@ -39,16 +39,14 @@ SortIncludes: true
 # IncludeBlocksStyle changed to IncludeBlocks, between xenial and disco, so we can't use it for consistency
 # IncludeBlocks: Regroup
 IncludeCategories:
-  - Regex: '^"gamemode.h"'
+  - Regex: '^<linux\/'
     Priority: 0
-  - Regex: '^"build-'
+  - Regex: '^<'
     Priority: 1
-  - Regex: '^"common-'
+  - Regex: '^"gamemode.h"'
     Priority: 2
-  - Regex: '^"gamemode-'
+  - Regex: '^"'
     Priority: 3
-  - Regex: '^<'
-    Priority: 4
 # IncludeIsMainRegex: (project doesn't use a main includes that can add other includes via regex)
 IndentCaseLabels: false
 IndentWidth: 4