]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Improve the #include block sorting
authorOndřej Surý <ondrej@isc.org>
Mon, 9 Mar 2020 14:26:54 +0000 (15:26 +0100)
committerOndřej Surý <ondrej@isc.org>
Mon, 9 Mar 2020 15:19:22 +0000 (16:19 +0100)
The IncludeCategories was incomplete, it missed pk11/ and dst/ headers
and the rule that put "" header after all <> headers was broken.

.clang-format

index 3e13625f085fe697581226003549d890dca4a654..3ed176aeb7a24467752f4447b647df86dc38ae46 100644 (file)
@@ -33,23 +33,35 @@ PointerBindsToType: false
 IncludeBlocks: Regroup
 IncludeCategories:
   - Regex:           '^<isc/'
-    Priority:        2
+    Priority:        5
+  - Regex:           '^<(pk11|pkcs11)/'
+    Priority:        10
   - Regex:           '^<dns/'
-    Priority:        3
-  - Regex:           '^<iscccc/'
-    Priority:        4
+    Priority:        15
+  - Regex:           '^<dst/'
+    Priority:        20
+  - Regex:           '^<isccc/'
+    Priority:        25
   - Regex:           '^<isccfg/'
-    Priority:        5
+    Priority:        30
   - Regex:           '^<ns/'
-    Priority:        6
-  - Regex:           '^<bind9/)'
-    Priority:        7
-  - Regex:           '^(<[^/]*)/)'
-    Priority:        8
-  - Regex:           '<[[:alnum:].]+>'
+    Priority:        35
+  - Regex:           '^<irs/'
+    Priority:        40
+  - Regex:           '^<bind9/'
+    Priority:        45
+  - Regex:           '^<(dig|named|rndc|confgen|dlz)/'
+    Priority:        50
+  - Regex:           '^<dlz_'
+    Priority:        55
+  - Regex:           '^".*"'
+    Priority:        99
+  - Regex:           '<openssl/'
+    Priority:        1
+  - Regex:           '<(mysql|protobuf-c)/'
     Priority:        1
-  - Regex:           '".*"'
-    Priority:        9
+  - Regex:           '.*'
+    Priority:        0
 KeepEmptyLinesAtTheStartOfBlocks: false
 MaxEmptyLinesToKeep: 1
 PenaltyBreakAssignment: 30