Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support clang-format whose version is not 7.0 #5139

Merged
merged 6 commits into from
Jul 8, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ci/travis/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ fi
if which clang-format >/dev/null; then
CLANG_FORMAT_VERSION=$(clang-format --version | awk '{print $3}')
if [[ $CLANG_FORMAT_VERSION != "7.0.0" ]]; then
echo "Please install clang-format 7.0.0. You currently are using $CLANG_FORMAT_VERSION."
exit 1
echo "WARNING: Please install clang-format 7.0.0. You currently are using $CLANG_FORMAT_VERSION."
read -p "Are you sure to continue?[y/n]" input
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rephrase like this?

WARNING: Ray uses clang-format 7.0.0, but you are using $CLANG_FORMAT_VERSION. This might generate different results. Do you want to continue? [y/n]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we should do the same thing for other tools as well.

if ! [ $input = 'y' ]; then
exit 1
fi
fi
else
echo "WARNING: clang-format is not installed!"
Expand Down