-
Notifications
You must be signed in to change notification settings - Fork 884
Add --dry-run option to simplify CI system integrations #154
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
Conversation
@jbduncan Oh, indeed, I missed it. And thanks for letting me know. |
You're very welcome! :) |
And still waiting for an reply from the Google guys. The jitpack solution is a good work-around, though. :) |
Interestingly, the buildifier tool, that is another Google's open source tool for formatting of Blaze and Bazel files, offers the |
@@ -32,6 +32,8 @@ | |||
"Usage: google-java-format [options] file(s)", | |||
"", | |||
"Options:", | |||
" -n, --dry-run", | |||
" Don't change anything, only check; supposed to be used form the CI.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supposed to be used from the CI
Actually, different check modes are needed: Example for this approach could be seen in Tensorflow's |
8bba939
to
e22b66d
Compare
Fixes: google#105. Test Plan: $ git show --name-only HEAD | grep java$ | xargs -r gjf --dry-run Need Formatting: [gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java,\ gerrit-server/src/main/java/com/google/gerrit/server/account/Emails.java]
#106 has been merged. |
Fixes: #105.
Test Plan:
$ git show --name-only HEAD | grep java$ | xargs -r gjf --dry-run
Need Formatting:
[gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java,
gerrit-server/src/main/java/com/google/gerrit/server/account/Emails.java]