@@ -104,25 +104,52 @@ ForEachMacros:
104104 - BOOST_FOREACH
105105IfMacros :
106106 - KJ_IF_MAYBE
107- IncludeBlocks : Regroup
107+ IncludeBlocks : Regroup
108108IncludeCategories :
109- - Regex : ' ^<ext/.*\.h>'
110- Priority : 2
111- SortPriority : 0
112- CaseSensitive : false
113- - Regex : ' ^<.*\.h>'
114- Priority : 1
115- SortPriority : 0
116- CaseSensitive : false
117- - Regex : ' ^<.*'
118- Priority : 2
119- SortPriority : 0
120- CaseSensitive : false
121- - Regex : ' .*'
122- Priority : 3
123- SortPriority : 0
124- CaseSensitive : false
125- IncludeIsMainRegex : ' ([-_](test|unittest))?$'
109+ # C standard library headers
110+ #
111+ # https://en.cppreference.com/w/cpp/header:
112+ # * C compatibility headers
113+ # * Special C compatibility headers
114+ # * Empty C headers
115+ # * Meaningless C headers
116+ # * Unsupported C headers
117+ - Regex : ' ^<(assert\.h|ctype\.h|errno\.h|fenv\.h|float\.h|inttypes\.h|limits\.h|locale\.h|math\.h|setjmp\.h|signal\.h|stdarg\.h|stddef\.h|stdint\.h|stdio\.h|stdlib\.h|string\.h|time\.h|uchar\.h|wchar\.h|wctype\.h|stdatomic\.h|ccomplex|complex\.h|ctgmath|tgmath\.h|ciso646|cstdalign|cstdbool|iso646\.h|stdalign\.h|stdbool\.h|stdatomic\.h|stdnoreturn\.h|threads\.h)>'
118+ Priority : 1
119+ SortPriority : 0
120+ # Linux system headers
121+ - Regex : ' ^<((arpa\/|linux\/|net/|netinet\/|sys\/).*|arm_neon\.h|dirent\.h|dlfcn\.h|fcntl\.h|ifaddrs\.h|jni\.h|libgen\.h|poll\.h|spawn\.h|termios\.h|unistd\.h)>'
122+ Priority : 1
123+ SortPriority : 1
124+ # winsock2.h
125+ - Regex : ' ^<winsock2\.h>'
126+ Priority : 1
127+ SortPriority : 2
128+ # windows.h
129+ - Regex : ' ^<windows.\h>'
130+ Priority : 1
131+ SortPriority : 3
132+ # Windows def.h headers
133+ - Regex : ' ^<(comdef\.h|ws2def\.h|ws2ipdef\.h)>'
134+ Priority : 1
135+ SortPriority : 4
136+ # Windows system headers
137+ - Regex : ' ^<(dbghelp\.h|dbt\.h|delayimp\.h|dshow\.h|io\.h|iphlpapi\.h|ks\.h|ksmedia\.h|memoryapi\.h|mfapi\.h|mferror\.h|mfidl\.h|mfreadwrite\.h|netioapi\.h|shellapi\.h|shlwapi\.h|sysinfoapi\.h|windns\.h|windowsx\.h|ws2tcpip\.h)>'
138+ Priority : 1
139+ SortPriority : 5
140+ # C++ standard library headers (lowercase and underscores with no .h suffix)
141+ - Regex : ' ^<([a-z_]+|cxxabi\.h)>'
142+ Priority : 2
143+ SortPriority : 6
144+ # Other library headers (angle brackets)
145+ - Regex : ' ^<.*'
146+ Priority : 3
147+ SortPriority : 7
148+ # Project headers (double quotes)
149+ - Regex : ' ^".*'
150+ Priority : 4
151+ SortPriority : 8
152+ IncludeIsMainRegex : ' (Test|_bench|_test)?$'
126153IncludeIsMainSourceRegex : ' '
127154IndentAccessModifiers : false
128155IndentCaseBlocks : false
@@ -213,7 +240,7 @@ RequiresClausePosition: OwnLine
213240RequiresExpressionIndentation : OuterScope
214241SeparateDefinitionBlocks : Leave
215242ShortNamespaceLines : 1
216- SortIncludes : false
243+ SortIncludes : true
217244SortJavaStaticImport : Before
218245SortUsingDeclarations : LexicographicNumeric
219246SpaceAfterCStyleCast : false
0 commit comments