From 0b6689e8c139b2f011aa87c9ffb32eafcb0d1e13 Mon Sep 17 00:00:00 2001 From: "Alon Zakai (kripken)" Date: Sat, 7 Dec 2019 13:51:53 -0800 Subject: [PATCH 1/2] Add 'please' to format notifications. --- clang-format-diff.sh | 2 +- clang-tidy-diff.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang-format-diff.sh b/clang-format-diff.sh index 50a9800b545..2525259e9dd 100755 --- a/clang-format-diff.sh +++ b/clang-format-diff.sh @@ -19,7 +19,7 @@ MERGE_BASE=$(git merge-base $BRANCH HEAD) FORMAT_MSG=$(git clang-format $MERGE_BASE -q --diff -- src/) if [ -n "$FORMAT_MSG" -a "$FORMAT_MSG" != "no modified files to format" ] then - echo "Run git clang-format before committing!" + 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. diff --git a/clang-tidy-diff.sh b/clang-tidy-diff.sh index 292ec6df623..95dedee7e55 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 "Fix clang-tidy errors before committing!" + echo "Please run clang-tidy errors before committing, or apply this diff:" echo # Run clang-tidy once again to show the error git diff -U0 $BRANCH... | $CLANG_TIDY_DIFF -quiet -p1 2> /dev/null From b5dfe06eeae8b55a323dfa1425252d53ccc8678c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 13 Dec 2019 09:34:00 -0800 Subject: [PATCH 2/2] fix --- clang-tidy-diff.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang-tidy-diff.sh b/clang-tidy-diff.sh index 95dedee7e55..6827f125b61 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 errors before committing, or apply this diff:" + echo "Please run clang-tidy before committing, or apply this diff:" echo # Run clang-tidy once again to show the error git diff -U0 $BRANCH... | $CLANG_TIDY_DIFF -quiet -p1 2> /dev/null