Siyao Meng created HDDS-8077:
--------------------------------

             Summary: Enforce new checkstyle: NewlineAtEndOfFile
                 Key: HDDS-8077
                 URL: https://issues.apache.org/jira/browse/HDDS-8077
             Project: Apache Ozone
          Issue Type: Wish
            Reporter: Siyao Meng


It is brought up by [~hemantkumar.dindi] a while back that we generally want a 
new line at the end of a file: 
https://github.com/apache/ozone/pull/4125#discussion_r1087167605

and it also makes sense in terms of diff output, from 
[doc|https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.html]:

bq. Rationale: Any source files and text files in general should end with a 
line separator to let other easily add new content at the end of file and 
"diff" command does not show previous lines as changed.


Back in HDDS-2119, [~nanda] actually added the NewlineAtEndOfFile check there 
it is commented out for some reason. I didn't find any objections in the 
[PR|https://github.com/apache/hadoop/pull/1435].

In order to add the check we just need to uncomment that line, and fix whatever 
exist files that don't have a new line at EOF similar to what I did in 
HDDS-6208.


Thoughts?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to