Skip to content

Commit 321222a

Browse files
authored
Mention that the diff from clang-format and -tidy can be applied (#2526)
1 parent fbce98c commit 321222a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang-format-diff.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ MERGE_BASE=$(git merge-base $BRANCH HEAD)
1919
FORMAT_MSG=$(git clang-format $MERGE_BASE -q --diff -- src/)
2020
if [ -n "$FORMAT_MSG" -a "$FORMAT_MSG" != "no modified files to format" ]
2121
then
22-
echo "Run git clang-format before committing!"
22+
echo "Please run git clang-format before committing, or apply this diff:"
2323
echo
2424
# Run git clang-format again, this time without capruting stdout. This way
2525
# clang-format format the message nicely and add color.

clang-tidy-diff.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CLANG_TIDY_DIFF=$CLANG_DIR/share/clang/clang-tidy-diff.py
2020
TIDY_MSG=$(git diff -U0 $BRANCH... | $CLANG_TIDY_DIFF -quiet -p1 2> /dev/null)
2121
if [ -n "$TIDY_MSG" -a "$TIDY_MSG" != "No relevant changes found." ]
2222
then
23-
echo "Fix clang-tidy errors before committing!"
23+
echo "Please run clang-tidy before committing, or apply this diff:"
2424
echo
2525
# Run clang-tidy once again to show the error
2626
git diff -U0 $BRANCH... | $CLANG_TIDY_DIFF -quiet -p1 2> /dev/null

0 commit comments

Comments
 (0)