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

Conversation

jiangzihao2009
Copy link
Contributor

@jiangzihao2009 jiangzihao2009 commented Jul 8, 2019

What do these changes do?

Print a warning and ask user whether to continue when installed version of clang-format is not 7.0.

Related issue number

Linter

  • I've run scripts/format.sh to lint the changes in this PR.

@jiangzihao2009 jiangzihao2009 changed the title Support use clang-format which is not version 7.0 Support use clang-format whose version is not 7.0 Jul 8, 2019
@jiangzihao2009 jiangzihao2009 changed the title Support use clang-format whose version is not 7.0 Support clang-format whose version is not 7.0 Jul 8, 2019
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.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/15174/
Test PASSed.

fi
else
echo "WARNING: clang-format is not installed!"
echo "WARNING: clang-format is not installed!"
exit 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

I didn't exit here before because I thought some Python developers (e.g., for RLlib) might not install clang-format. It might be better to warn them and then ask if they want to proceed?

Copy link
Collaborator

@robertnishihara robertnishihara left a comment

Choose a reason for hiding this comment

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

This looks good to me! I left one comment that I think should be addressed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/15184/
Test PASSed.

@raulchen raulchen merged commit b4e51c8 into ray-project:master Jul 8, 2019
@raulchen raulchen deleted the format_script branch July 8, 2019 09:15
@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/15185/
Test PASSed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants