mirror of
https://github.com/upx/upx.git
synced 2024-11-26 22:20:52 +00:00
Add and use .clang-format file.
This commit is contained in:
parent
fdc68812c5
commit
8236276a90
12
.clang-format
Normal file
12
.clang-format
Normal file
@ -0,0 +1,12 @@
|
||||
# for clang-format-10.0.1
|
||||
---
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
#AlignConsecutiveAssignments: true
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
ColumnLimit: 100
|
||||
IndentWidth: 4
|
||||
SortIncludes: false
|
||||
SpaceAfterCStyleCast: true
|
||||
Standard: Cpp03
|
||||
...
|
@ -14,22 +14,12 @@ CLANG_FORMAT="$HOME/bin/bin-upx/clang-format-10.0.1"
|
||||
fi
|
||||
if [[ ! -f $CLANG_FORMAT ]]; then
|
||||
echo "ERROR: $0: cannot find clang-format-10.0.1"
|
||||
echo "ERROR: $0: please visit https://github.com/upx/upx-stubtools/releases"
|
||||
echo "ERROR: $0: please visit https://github.com/upx/upx-stubtools"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
s='Language: Cpp, BasedOnStyle: LLVM, '
|
||||
s="$s"' AccessModifierOffset: -4, '
|
||||
#s="$s"' AllowShortFunctionsOnASingleLine: None, '
|
||||
s="$s"' AlwaysBreakTemplateDeclarations: true, '
|
||||
s="$s"' ColumnLimit: 100, '
|
||||
####s="$s"' FixNamespaceComments: false, ' # added in llvm-5.0
|
||||
s="$s"' IndentWidth: 4, '
|
||||
s="$s"' SortIncludes: false, ' # added in llvm-3.8
|
||||
s="$s"' SpaceAfterCStyleCast: true, ' # added in llvm-3.6
|
||||
s="$s"' Standard: Cpp03, '
|
||||
CLANG_FORMAT_STYLE='-style={'"$s"' }'
|
||||
# NOTE: we use .clang-format config from upx.git/.clang-format
|
||||
|
||||
#echo $CLANG_FORMAT
|
||||
exec "$CLANG_FORMAT" "$CLANG_FORMAT_STYLE" "$@"
|
||||
exec "$CLANG_FORMAT" -style=file "$@"
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user