Skip to content

Conversation

@Anmol202005
Copy link
Collaborator

Fixes: #124

Implemented recipe for NewlineAtEndOfFile: https://checkstyle.sourceforge.io/checks/misc/newlineatendoffile.html

@Anmol202005 Anmol202005 force-pushed the eol branch 15 times, most recently from 8b311bc to e5cc5a3 Compare October 30, 2025 19:29
@Anmol202005
Copy link
Collaborator Author

Finally got CI GREEN.

@rdiachenko pls review :)

@Anmol202005
Copy link
Collaborator Author

@romani @rdiachenko ping.

Copy link
Member

@romani romani left a 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:

final Space eof = sourceFile.getEof();
final String lastWhitespace = eof.getLastWhitespace();

if (!lineEnding.equals(lastWhitespace)) {
Copy link
Member

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.

Copy link
Collaborator Author

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.

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

last:

@Anmol202005 Anmol202005 force-pushed the eol branch 2 times, most recently from 6d359ff to a4eac5f Compare November 17, 2025 00:25
@romani romani mentioned this pull request Nov 19, 2025
Copy link
Member

@romani romani left a 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.

@Anmol202005
Copy link
Collaborator Author

Anmol202005 commented Nov 19, 2025

Do we need explicitly add this recipe to checkstyle main repo config to be executed by CI ?

No
https://github.com/checkstyle/checkstyle/blob/50aa6850b3b6e1cf3fd7ac0238ba269b01753471/rewrite.yml#L6-L11

@romani
Copy link
Member

romani commented Nov 20, 2025

@rdiachenko , please finish review

Copy link
Member

@rdiachenko rdiachenko left a comment

Choose a reason for hiding this comment

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

lgtm

@rdiachenko
Copy link
Member

@Anmol202005 please update README with proper links to a new recipe, and ok to merge after that

@romani
Copy link
Member

romani commented Nov 22, 2025

After rebase , there might be some pitest mutations, just add them to suppression. No suppression rule will be enforced after this PR

@romani
Copy link
Member

romani commented Nov 23, 2025

@Anmol202005 , if you send PR for #127 (comment), system will print patch for suppression and it will be easy to update suppression.

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.

Implement recipe for NewlineAtEndOfFile

3 participants