Skip to content

Commit

Permalink
ci: clang-format step, reorder and reword error output
Browse files Browse the repository at this point in the history
  • Loading branch information
pcanal committed Feb 4, 2025
1 parent f2a354f commit 7b821d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .ci/format_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ if [ "$RESULT_OUTPUT" == "no modified files to format" ] \
echo "clang-format passed."
exit 0
else
echo "clang-format failed."
echo "To reproduce it locally please run"
echo -e "clang-format failed with the following diff:\n"
echo "$RESULT_OUTPUT"

echo -e "\nTo reproduce it locally please run"
echo -e "\tgit checkout $TRAVIS_PULL_REQUEST_BRANCH"
echo -e "\tgit-clang-format --commit $BASE_COMMIT --diff --binary $(which clang-format)"
echo "$RESULT_OUTPUT"

echo -e "\n\nPlease apply the code formatting changes without bloating the history."
echo -e "\tConsider running:"
echo -e "\nConsider running the following to apply the code formatting changes without bloating the history."
echo -e "\t\tgit checkout $TRAVIS_PULL_REQUEST_BRANCH"
echo -e "\t\tgit rebase -i -x \"git-clang-format master && git commit -a --allow-empty --fixup=HEAD\" --strategy-option=theirs origin/master"
echo -e "\t Then inspect the results with git log --oneline"
Expand Down

0 comments on commit 7b821d3

Please sign in to comment.