Skip to content
Permalink
Browse files

Reformat Source: Split long statements

  • Loading branch information...
sanssecours committed May 12, 2019
1 parent a92b743 commit ed46d713f00c2b4477bf3976b530e687f7590b7e
Showing with 7 additions and 2 deletions.
  1. +7 −2 scripts/reformat-source
@@ -36,11 +36,16 @@ cd "$SOURCE" || {
}

if [ $# -gt 0 ]; then
source_files=$(printf "%s\n" "$@" | grep -x -E '.*\.(c|h|cpp|hpp|c\.in|h\.in)' | grep -v '^src/tools/pythongen.*' | grep -v '^tests/shell/gen.*')
source_files=$(printf "%s\n" "$@" |
grep -x -E '.*\.(c|h|cpp|hpp|c\.in|h\.in)' |
grep -v '^src/tools/pythongen.*' |
grep -v '^tests/shell/gen.*')
if [ -z "$source_files" ]; then
exit 0
fi
else
source_files=$(git ls-files '*.c' '*.h' '*.cpp' '*.hpp' '*.c.in' '*.h.in' | grep -v '^src/tools/pythongen.*' | grep -v '^tests/shell/gen.*')
source_files=$(git ls-files '*.c' '*.h' '*.cpp' '*.hpp' '*.c.in' '*.h.in' |
grep -v '^src/tools/pythongen.*' |
grep -v '^tests/shell/gen.*')
fi
printf "%s\n" "$source_files" | sed -nE 's/(.*)/'"'"'\1'"'"'/p' | xargs "$CLANG_FORMAT" -style=file -i

0 comments on commit ed46d71

Please sign in to comment.
You can’t perform that action at this time.