Commit 7dcd4993 authored by James Zern's avatar James Zern
Browse files

remove tools/vpx-style.sh

update ftfy.sh to use clang-format

Change-Id: I8ac740c5b3842beed2b8878fbe506f381f4c57e4
(cherry picked from commit 958ae5af9c892e5328ec0363d1a69afbfe0e0907)
parent 92ed0c91
...@@ -32,7 +32,7 @@ vpx_style() { ...@@ -32,7 +32,7 @@ vpx_style() {
for f; do for f; do
case "$f" in case "$f" in
*.h|*.c|*.cc) *.h|*.c|*.cc)
"${dirname_self}"/vpx-astyle.sh "$f" clang-format -i --style=file "$f"
;; ;;
esac esac
done done
...@@ -102,9 +102,8 @@ CLEAN_FILES="${CLEAN_FILES} ${ORIG_COMMIT_MSG} ${NEW_COMMIT_MSG}" ...@@ -102,9 +102,8 @@ CLEAN_FILES="${CLEAN_FILES} ${ORIG_COMMIT_MSG} ${NEW_COMMIT_MSG}"
# Preconditions # Preconditions
[ $# -lt 2 ] || usage [ $# -lt 2 ] || usage
# Check that astyle supports pad-header and align-pointer=name if ! clang-format -version >/dev/null 2>&1; then
if ! astyle --pad-header --align-pointer=name < /dev/null; then log "clang-format not found"
log "Install astyle v1.24 or newer"
exit 1 exit 1
fi fi
......
#!/bin/sh
set -e
astyle --style=java --indent=spaces=2 --indent-switches\
--min-conditional-indent=0 \
--pad-oper --pad-header --unpad-paren \
--align-pointer=name \
--indent-preprocessor --convert-tabs --indent-labels \
--suffix=none --quiet --max-instatement-indent=80 "$@"
# Disabled, too greedy?
#sed -i 's;[[:space:]]\{1,\}\[;[;g' "$@"
sed_i() {
# Incompatible sed parameter parsing.
if sed -i 2>&1 | grep -q 'requires an argument'; then
sed -i '' "$@"
else
sed -i "$@"
fi
}
sed_i -e 's/[[:space:]]\{1,\}\([,;]\)/\1/g' \
-e 's/[[:space:]]\{1,\}\([+-]\{2\};\)/\1/g' \
-e 's/,[[:space:]]*}/}/g' \
-e 's;//\([^/[:space:]].*$\);// \1;g' \
-e 's/^\(public\|private\|protected\):$/ \1:/g' \
-e 's/[[:space:]]\{1,\}$//g' \
"$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment