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

Implement fmt.sh --diff for the Java style check #8734

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

stefanobaghino-da
Copy link
Contributor

When run with --diff, fmt.sh now only checks for the .java files that have been
changed since the fork point. This makes local git pre-push hooks more quiet
while preserving the safe CI behavior (which doesn't use --diff).

changelog_begin
changelog_end

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

When run with --diff, fmt.sh now only checks for the .java files that have been
changed since the fork point. This makes local git pre-push hooks more quiet
while preserving the safe CI behavior (which doesn't use --diff).

changelog_begin
changelog_end
@stefanobaghino-da
Copy link
Contributor Author

I tested that the changes behaved as expected on Java files using various combinations of with and without --test and --diff.

What is an hlint violation that I can use to make sure I'm not breaking anything there?

@cocreature
Copy link
Contributor

What is an hlint violation that I can use to make sure I'm not breaking anything there?

redundant parentheses iirc

Copy link
Contributor

@cocreature cocreature left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

fmt.sh Show resolved Hide resolved
@stefanobaghino-da
Copy link
Contributor Author

What is an hlint violation that I can use to make sure I'm not breaking anything there?

redundant parentheses iirc

Tested, works. 🙇🏻

@stefanobaghino-da stefanobaghino-da merged commit 45336d6 into main Feb 3, 2021
@stefanobaghino-da stefanobaghino-da deleted the ste/javafmt-diff branch February 3, 2021 13:00
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.

2 participants