Write script for formatting code
This commit is contained in:
parent
308deb3886
commit
8f4fe21bcf
21
.clang-format
Normal file
21
.clang-format
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
BasedOnStyle: WebKit
|
||||
AlignAfterOpenBracket: AlwaysBreak
|
||||
AlignConsecutiveMacros: false
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlines: DontAlign
|
||||
AlignOperands: false
|
||||
AlignTrailingComments: false
|
||||
TabWidth: 4
|
||||
UseTab: ForIndentation
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Right
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
ColumnLimit: 77
|
||||
...
|
5
scripts/format.sh
Normal file
5
scripts/format.sh
Normal file
@ -0,0 +1,5 @@
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
find . -not \( -path './.git' -prune \) \
|
||||
-not \( -path './build' -prune \) \
|
||||
-name '*.c' -o -name '*.h' \
|
||||
| xargs -n 1 clang-format -i
|
Loading…
x
Reference in New Issue
Block a user