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

Improve format check #4096

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

atakavci
Copy link
Contributor

@atakavci atakavci commented Feb 21, 2025

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.

@atakavci atakavci self-assigned this Feb 22, 2025
@atakavci atakavci requested review from tishun and ggivo February 22, 2025 12:13
@atakavci atakavci marked this pull request as ready for review February 22, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant