diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2021-07-26 11:48:04 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2021-07-26 19:57:50 +0100 |
commit | 8121720cd10f97643b2375e4d2208e46c2920ce9 (patch) | |
tree | 2f2fe851491cddbeb9bb49fcb89759bf7951368c | |
parent | 6bf58d4bb9044a7c65818d5de5d4ca747766e77f (diff) | |
download | waffle-8121720cd10f97643b2375e4d2208e46c2920ce9.tar.gz |
clang-format: add config file
Copy the clang-format config from virgl, tweaking it slightly - column
sizes and include files order.
It does highlight few mostly trivial changes through the codebase.
Albeit none of them is a deal breaker so, no point in a wholesale
"fixup". The follow-up CI stage will ensure, newly merged code is good.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
-rw-r--r-- | .clang-format | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..dccdfd2 --- /dev/null +++ b/.clang-format @@ -0,0 +1,39 @@ +BasedOnStyle: LLVM +AlwaysBreakAfterReturnType: TopLevel +BinPackParameters: false +BraceWrapping: + AfterControlStatement: false + AfterEnum: false + AfterFunction: true + AfterStruct: false + BeforeElse: false + SplitEmptyFunction: true +BreakBeforeBraces: Custom +ColumnLimit: 80 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: false +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^"(droid|cgl|wgbm|glx|nacl|sl|wayland|wl|wgl)' + Priority: 8 + - Regex: '^"wegl' + Priority: 7 + - Regex: '^"x11' + Priority: 6 + - Regex: '^"linux' + Priority: 5 + - Regex: '^"wcore' + Priority: 4 + - Regex: '^"api' + Priority: 3 + - Regex: '^"waffle' + Priority: 2 + - Regex: '.*/' + Priority: 1 + - Regex: '.*' + Priority: 0 +IndentWidth: 4 +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyExcessCharacter: 100 +SpaceAfterCStyleCast: false +SpaceBeforeCpp11BracedList: false |