Adding clang-format script
All the code in zenity from now, will follow this format style
This commit is contained in:
parent
3b64d05e8a
commit
8c5e60de83
34
.clang-format
Normal file
34
.clang-format
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
BasedOnStyle: GNU
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AlignConsecutiveAssignments: 'false'
|
||||
AlignConsecutiveDeclarations: 'false'
|
||||
AlignOperands: 'false'
|
||||
AlignTrailingComments: 'false'
|
||||
AllowAllParametersOfDeclarationOnNextLine: 'false'
|
||||
AllowShortBlocksOnASingleLine: 'false'
|
||||
AllowShortCaseLabelsOnASingleLine: 'false'
|
||||
AllowShortFunctionsOnASingleLine: 'None'
|
||||
AllowShortLoopsOnASingleLine: 'false'
|
||||
AllowShortIfStatementsOnASingleLine: 'false'
|
||||
BinPackArguments: 'false'
|
||||
BinPackParameters: 'true'
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: 'true'
|
||||
BreakConstructorInitializersBeforeComma: 'true'
|
||||
Cpp11BracedListStyle: true
|
||||
ColumnLimit: '80'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
|
||||
IndentCaseLabels: 'true'
|
||||
Language: Cpp
|
||||
NamespaceIndentation: None
|
||||
PointerAlignment: Right
|
||||
SortIncludes: 'true'
|
||||
SpaceAfterCStyleCast: 'true'
|
||||
Standard: Cpp03
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
UseTab: Always
|
||||
...
|
||||
|
3
utils/format.sh
Normal file
3
utils/format.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
find src -type f \( -iname '*.c' -or -iname '*.h' \) -exec clang-format -i -style=file {} \;
|
||||
|
Reference in New Issue
Block a user