[ 
https://issues.apache.org/jira/browse/OFBIZ-11428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17047591#comment-17047591
 ] 

ASF subversion and git services commented on OFBIZ-11428:
---------------------------------------------------------

Commit e665f9dc68a4cd494c71e61134b3833d27de47ef in ofbiz-framework's branch 
refs/heads/trunk from Daniel Watford
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=e665f9d ]

Improved: Set checkstyle to use LF line endings

(OFBIZ-11428)

Setting checkstyle to use LF line endings means that a newline at the
end of a source file is correctly detected no matter whether it is
checked out with LF or CRLF line endings.


> Checkstyle incorrectly reports violation for missing new line at end of file 
> on Windows
> ---------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-11428
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11428
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: tools
>    Affects Versions: Trunk
>            Reporter: Daniel Watford
>            Assignee: Daniel Watford
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> If building on Windows with Ofbiz sources checked out from git using LF line 
> endings rather than CRLF line endings checkstyle will report violations 
> stating that source files do not end with a new line.
> Issue is that when running on windows checkstyle assumes line endings to be 
> made up for CRLF and looks for those two characters at the end of a file. If 
> sources are checked out with LF line endings then only the LF character will 
> be present at the end of the file, causing checkstyle to report the violation.
> This can be resolved by specifying checkstyle use LF for line endings, 
> meaning a newline at the end of a file will be detected correctly regardless 
> of whether sources are checked out in CRLF or LF line ending mode.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to