summaryrefslogtreecommitdiff
path: root/clang-tidy-diff.sh
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2020-02-12 18:19:46 -0800
committerGitHub <noreply@github.com>2020-02-12 18:19:46 -0800
commit41e9d4b244986149603ad83a4f526d950b3a441b (patch)
tree2ef4544ef443298237432b6bd474747cb776e266 /clang-tidy-diff.sh
parent321f61c7c3975e902b6f1d2a606b6595aaf701c9 (diff)
downloadbinaryen-41e9d4b244986149603ad83a4f526d950b3a441b.tar.gz
binaryen-41e9d4b244986149603ad83a4f526d950b3a441b.tar.bz2
binaryen-41e9d4b244986149603ad83a4f526d950b3a441b.zip
Fix clang-tidy in Travis (#2656)
- Run cmake before clang-tidy. clang-tidy requires the build database file `compile_commands.json`, which is created by cmake. - Change the error message for clang-tidy. Unlike clang-format, clang-tidy does not show diff to apply; it only prints error messages. Fixes #2653.
Diffstat (limited to 'clang-tidy-diff.sh')
-rwxr-xr-xclang-tidy-diff.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tidy-diff.sh b/clang-tidy-diff.sh
index 6827f125b..5f3495504 100755
--- a/clang-tidy-diff.sh
+++ b/clang-tidy-diff.sh
@@ -20,7 +20,7 @@ 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 run clang-tidy before committing, or apply this diff:"
+ 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