diff options
author | Heejin Ahn <aheejin@gmail.com> | 2021-09-29 11:23:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 11:23:09 -0700 |
commit | 6b80ef6cccfd14b9b6620c5d41a148024d78576c (patch) | |
tree | 27f1a0cc96a512d6ed80f3f5b40e83de98e2e9f9 /scripts | |
parent | 414d54a28b749af6abcaec6b85c99cc69de6b7dd (diff) | |
download | binaryen-6b80ef6cccfd14b9b6620c5d41a148024d78576c.tar.gz binaryen-6b80ef6cccfd14b9b6620c5d41a148024d78576c.tar.bz2 binaryen-6b80ef6cccfd14b9b6620c5d41a148024d78576c.zip |
Clang-format c/cpp files in test directory (#4192)
This clang-formats c/cpp files in test/ directory, and updates
clang-format-diff.sh so that it does not ignore test/ directory anymore.
bigswitch.cpp is excluded from formatting, because there are big
commented-out code blocks, and apparently clang-format messes up
formatting in them. Also to make matters worse, different clang-format
versions do different things on those commented-out code blocks.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/clang-format-diff.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/clang-format-diff.sh b/scripts/clang-format-diff.sh index 01a813f2b..6c7144f58 100755 --- a/scripts/clang-format-diff.sh +++ b/scripts/clang-format-diff.sh @@ -12,13 +12,13 @@ else fi MERGE_BASE=$(git merge-base $BRANCH HEAD) -FORMAT_MSG=$(git clang-format $MERGE_BASE -q --diff -- src/) +FORMAT_MSG=$(git clang-format $MERGE_BASE -q --diff) if [ -n "$FORMAT_MSG" -a "$FORMAT_MSG" != "no modified files to format" ] then echo "Please run git clang-format before committing, or apply this diff:" echo # Run git clang-format again, this time without capruting stdout. This way # clang-format format the message nicely and add color. - git clang-format $MERGE_BASE -q --diff -- src/ + git clang-format $MERGE_BASE -q --diff exit 1 fi |