summaryrefslogtreecommitdiff
path: root/clang-tidy-diff.sh
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2020-04-09 13:51:07 -0400
committerGitHub <noreply@github.com>2020-04-09 10:51:07 -0700
commit0dcb68967dfcbd0d839563b848cb494b475ed15a (patch)
tree958be0e2e186832b3f6fb2e661ce388f37b1a861 /clang-tidy-diff.sh
parent9d572bd24d4e9109fad70dbbd29bb04b2ea47113 (diff)
downloadbinaryen-0dcb68967dfcbd0d839563b848cb494b475ed15a.tar.gz
binaryen-0dcb68967dfcbd0d839563b848cb494b475ed15a.tar.bz2
binaryen-0dcb68967dfcbd0d839563b848cb494b475ed15a.zip
Move scripts in the `scripts` directory (#2735)
Diffstat (limited to 'clang-tidy-diff.sh')
-rwxr-xr-xclang-tidy-diff.sh28
1 files changed, 0 insertions, 28 deletions
diff --git a/clang-tidy-diff.sh b/clang-tidy-diff.sh
deleted file mode 100755
index 5f3495504..000000000
--- a/clang-tidy-diff.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-set -o errexit
-
-# When we are running on travis and *not* part of a pull request we don't
-# have any upstream branch to compare against.
-if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
- echo "Skipping since not running on travis PR"
- exit 0
-fi
-
-if [ -n "$TRAVIS_BRANCH" ]; then
- BRANCH=$TRAVIS_BRANCH
-else
- BRANCH=origin/master
-fi
-
-CLANG_DIR=$(dirname $(dirname $(which clang-tidy)))
-CLANG_TIDY_DIFF=$CLANG_DIR/share/clang/clang-tidy-diff.py
-TIDY_MSG=$(git diff -U0 $BRANCH... | $CLANG_TIDY_DIFF -quiet -p1 2> /dev/null)
-if [ -n "$TIDY_MSG" -a "$TIDY_MSG" != "No relevant changes found." ]
-then
- echo "Please fix clang-tidy errors before committing"
- echo
- # Run clang-tidy once again to show the error
- git diff -U0 $BRANCH... | $CLANG_TIDY_DIFF -quiet -p1 2> /dev/null
- exit 1
-fi