mirror of
https://github.com/upx/upx
synced 2025-10-26 23:36:41 +08:00
Add and use .clang-format file.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user