summaryrefslogtreecommitdiff
path: root/tools/.clang-format
diff options
context:
space:
mode:
authormagh <magh@maghmogh.com>2023-03-06 18:44:55 -0600
committermagh <magh@maghmogh.com>2023-03-06 18:44:55 -0600
commite80d9d8871b325a04b18f90a9ea4bb7fd148fb25 (patch)
tree79dbdb8506b7ff1e92549188d1b94cfc0b3503ae /tools/.clang-format
add m1n1HEADmaster
Diffstat (limited to 'tools/.clang-format')
-rw-r--r--tools/.clang-format32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/.clang-format b/tools/.clang-format
new file mode 100644
index 0000000..131397a
--- /dev/null
+++ b/tools/.clang-format
@@ -0,0 +1,32 @@
+BasedOnStyle: LLVM
+IndentWidth: 4
+UseTab: Never
+BreakBeforeBraces: Linux
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortFunctionsOnASingleLine: false
+AlignConsecutiveMacros: true
+IndentCaseLabels: true
+ColumnLimit: 100
+IncludeBlocks: Regroup
+IncludeIsMainRegex: '(_.*)?$'
+
+# Include block order goes like this
+# - config.h style files, including ../config.h
+# - system headers (<>)
+# - All m1n1 headers, starting with the "this file" header, rest sorted
+# - 3rd party code headers
+# - build artifact headers (stuff outside of src/)
+IncludeCategories:
+ - Regex: '^"(\.\./)*build/build_.*\.h"$'
+ Priority: -3
+ - Regex: '^"(\.\./)*config\.h"$'
+ Priority: -2
+ - Regex: '^<'
+ Priority: -1
+ - Regex: '^"\.\./'
+ Priority: 3
+ - Regex: '/'
+ Priority: 2
+ - Regex: '.*'
+ Priority: 0
+ SortPriority: 1