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

Print filenames that need to be reformatted #386

Merged
merged 1 commit into from Nov 26, 2019
Merged

Conversation

@mindhog
Copy link
Member

mindhog commented Nov 26, 2019

Print the names of all java files that need reformatting during the check and
reformat operations.


This change is Reviewable

Print the names of all java files that need reformatting during the check and
reformat operations.
@mindhog mindhog requested a review from weiminyu Nov 26, 2019
@googlebot googlebot added the cla: yes label Nov 26, 2019
Copy link
Collaborator

weiminyu left a comment

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @mindhog and @weiminyu)


java-format/google-java-format-git-diff.sh, line 71 at r1 (raw file):

      callResult=$(git diff -U0 ${forkPoint} | \
          ${SCRIPT_DIR}/google-java-format-diff.py -p1)

Can showNoncompliantFiles() replace this?

Copy link
Member Author

mindhog left a comment

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @weiminyu)


java-format/google-java-format-git-diff.sh, line 71 at r1 (raw file):

Previously, weiminyu (Weimin Yu) wrote…
      callResult=$(git diff -U0 ${forkPoint} | \
          ${SCRIPT_DIR}/google-java-format-diff.py -p1)

Can showNoncompliantFiles() replace this?

No, because showNoncompliantFiles consumes most of the output - it only prints filenames.

Also note that I would have liked to somehow get filenames from google-java-format-diff.py, but that's something that only the underlying google-java-format knows in the end and I couldn't find a way to get it to output that in addition to applying the changes.

Copy link
Collaborator

weiminyu left a comment

Reviewable status: 0 of 1 files reviewed, all discussions resolved

@mindhog mindhog merged commit 28499d2 into google:master Nov 26, 2019
6 of 7 checks passed
6 of 7 checks passed
code-review/reviewable 1 file left
Details
LGTM analysis: Java No code changes detected
Details
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No code changes detected
Details
cla/google All necessary CLAs are signed
kokoro-foss Kokoro build finished
Details
kokoro-internal Kokoro build finished
Details
@mindhog mindhog deleted the mindhog:checkstyle branch Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.