Update format.sh
Summary: The format.sh was referring to an outdated `benchmarks/` directory and left out a bunch of other C/C++ files. This updates it to cover all but the build artifacts and vendored libraries in `lib/`. Reviewed By: emilsjolander Differential Revision: D4481490 fbshipit-source-id: 056e00359f794d0aa999fd65ec1ef0c657738867
This commit is contained in:
committed by
Facebook Github Bot
parent
44590b8907
commit
6daad3ae66
67
format.sh
67
format.sh
@@ -1,34 +1,37 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
clang-format \
|
FILES=$(find . \( -path ./buck-out -o -path ./lib \) -prune -o \
|
||||||
-style="{ \
|
\( -name \*.h -o -name \*.c -o -name \*.cpp \) -print)
|
||||||
AlignAfterOpenBracket: Align, \
|
|
||||||
AlignEscapedNewlinesLeft: true, \
|
for f in $FILES "$@"; do
|
||||||
AlignOperands: true, \
|
clang-format \
|
||||||
AllowAllParametersOfDeclarationOnNextLine: false, \
|
-style="{ \
|
||||||
AllowShortBlocksOnASingleLine: false, \
|
AlignAfterOpenBracket: Align, \
|
||||||
AllowShortCaseLabelsOnASingleLine: false, \
|
AlignEscapedNewlinesLeft: true, \
|
||||||
AllowShortFunctionsOnASingleLine: false, \
|
AlignOperands: true, \
|
||||||
AllowShortIfStatementsOnASingleLine: false, \
|
AllowAllParametersOfDeclarationOnNextLine: false, \
|
||||||
AllowShortLoopsOnASingleLine: false, \
|
AllowShortBlocksOnASingleLine: false, \
|
||||||
BinPackArguments: false, \
|
AllowShortCaseLabelsOnASingleLine: false, \
|
||||||
BinPackParameters: false, \
|
AllowShortFunctionsOnASingleLine: false, \
|
||||||
BreakBeforeBraces: Attach, \
|
AllowShortIfStatementsOnASingleLine: false, \
|
||||||
ColumnLimit: 100, \
|
AllowShortLoopsOnASingleLine: false, \
|
||||||
ContinuationIndentWidth: 4, \
|
BinPackArguments: false, \
|
||||||
IndentCaseLabels: true, \
|
BinPackParameters: false, \
|
||||||
IndentWidth: 2, \
|
BreakBeforeBraces: Attach, \
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: false, \
|
ColumnLimit: 100, \
|
||||||
Language: Cpp, \
|
ContinuationIndentWidth: 4, \
|
||||||
PenaltyBreakBeforeFirstCallParameter: 100, \
|
IndentCaseLabels: true, \
|
||||||
PenaltyBreakString: 1000, \
|
IndentWidth: 2, \
|
||||||
PenaltyExcessCharacter: 100, \
|
KeepEmptyLinesAtTheStartOfBlocks: false, \
|
||||||
PenaltyReturnTypeOnItsOwnLine: 100, \
|
Language: Cpp, \
|
||||||
PointerAlignment: Right, \
|
PenaltyBreakBeforeFirstCallParameter: 100, \
|
||||||
SortIncludes: true, \
|
PenaltyBreakString: 1000, \
|
||||||
SpaceAfterCStyleCast: true, \
|
PenaltyExcessCharacter: 100, \
|
||||||
UseTab: Never, \
|
PenaltyReturnTypeOnItsOwnLine: 100, \
|
||||||
}" "$@" \
|
PointerAlignment: Right, \
|
||||||
-i $(dirname $0)/yoga/*.{h,c,cpp} \
|
SortIncludes: true, \
|
||||||
$(dirname $0)/benchmarks/*.{h,c,cpp} \
|
SpaceAfterCStyleCast: true, \
|
||||||
$(dirname $0)/java/jni/*.{h,c,cpp}
|
UseTab: Never, \
|
||||||
|
ObjCSpaceAfterProperty: true, \
|
||||||
|
}" -i "$f"
|
||||||
|
done
|
||||||
|
Reference in New Issue
Block a user