Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an improvement to our iterative approach for code style checks.
Issue Statement
The
Java Format Check
flow fails in any pull request (PR) unless all modified Java files are properly formatted. The check evaluates the entire file, not just the lines that were changed or added. This means that even if the change is a single line, the entire file is checked, and any formatting issues in untouched parts of the file will cause the check to fail. As a result, the PR may be marked as failed at the higher level, even if only the unmodified sections of the file contain formatting issues. This is undesirable, as it makes the PR stand out as a "checks failed", in the list of PRs and so on,, just because of the formatting issues that aren’t part of the actual change.Suggested Improvement
We propose to check and compare the number of formatting issues at the file level for each modified file. If the number of formatting issues changes (i.e., new issues are introduced or existing ones are fixed), only then will the check fail.