-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
base: master
Are you sure you want to change the base?
Improve format check #4096
Conversation
Hey sorry if this sounds too rash but ... I am really not sure why we are wasting time thinking about this when we can simply reformat the repository and be done with it. Ultimately we do want to have consistent formatting, correct? |
@atakavci I agree with @tishun that we just need to reformat the whole code base at once. |
from my POV, its all about the impact of it on other branches and forks with open PRs . |
right,, we need something like check numbers and fail only if it increases. |
i agree this is getting complex. TBH, i am surprised that i cant spot a tool/action doing this. |
I can understand your hesitation. Such a complex change is bound to hurt somebody. But in my opinion this is fine. We need to "bite the bullet" and draw the line if we want to have consistent formatting. Jedis forksWe have no obligation to keep our codebase compatible with other forks, it is the other way around. Jedis branchesThis is the problem I personally feel is going to have the most impact on us. This is why I said "bite the bullet". So my opinion is to reformat the code. |
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.