-
Notifications
You must be signed in to change notification settings - Fork 6
Issue #124: Implement recipe for NewlineAtEndOfFile #125
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
base: main
Are you sure you want to change the base?
Conversation
8b311bc to
e5cc5a3
Compare
|
Finally got CI GREEN. @rdiachenko pls review :) |
|
@romani @rdiachenko ping. |
romani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for delay ...
items:
src/main/java/org/checkstyle/autofix/recipe/NewlineAtEndOfFile.java
Outdated
Show resolved
Hide resolved
src/main/java/org/checkstyle/autofix/recipe/NewlineAtEndOfFile.java
Outdated
Show resolved
Hide resolved
src/main/java/org/checkstyle/autofix/recipe/NewlineAtEndOfFile.java
Outdated
Show resolved
Hide resolved
| final Space eof = sourceFile.getEof(); | ||
| final String lastWhitespace = eof.getLastWhitespace(); | ||
|
|
||
| if (!lineEnding.equals(lastWhitespace)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not trust checkstyle violation ? or it is save check in case of second execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a check for second execution.
src/main/java/org/checkstyle/autofix/recipe/NewlineAtEndOfFile.java
Outdated
Show resolved
Hide resolved
romani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last:
6d359ff to
a4eac5f
Compare
romani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need explicitly add this recipe to checkstyle main repo config to be executed by CI ?
thansk a lot for your work.
|
|
@rdiachenko , please finish review |
rdiachenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
@Anmol202005 please update README with proper links to a new recipe, and ok to merge after that |
|
After rebase , there might be some pitest mutations, just add them to suppression. No suppression rule will be enforced after this PR |
|
@Anmol202005 , if you send PR for #127 (comment), system will print patch for suppression and it will be easy to update suppression. |
Fixes: #124
Implemented recipe for NewlineAtEndOfFile: https://checkstyle.sourceforge.io/checks/misc/newlineatendoffile.html