com.puppycrawl.tools.checkstyle.checks
public class NewlineAtEndOfFileCheck extends AbstractFileSetCheck
Checks that there is a newline at the end of each file.
An example of how to configure the check is:
<module name="NewlineAtEndOfFile"/>
This will check against the platform-specific default line separator.
It is also possible to enforce the use of a specific line-separator across platforms, with the 'lineSeparator' property:
<module name="NewlineAtEndOfFile"> <property name="lineSeparator" value="lf"/> </module>
Valid values for the 'lineSeparator' property are 'system' (system default), 'crlf' (windows), 'cr' (mac) and 'lf' (unix).
Version: 1.0
Method Summary | |
---|---|
void | process(File[] aFiles)
{@inheritDoc} |
void | setLineSeparator(String aLineSeparator)
Sets the line separator to one of 'crlf', 'lf' or 'cr'.
|
Parameters: aLineSeparator The line separator to set
Throws: IllegalArgumentException If the specified line separator is not one of 'crlf', 'lf' or 'cr'