Add rules for redundant empty lines
This commit is contained in:
parent
946cb46b30
commit
7c91c0dbda
@ -19,7 +19,10 @@
|
||||
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
|
||||
<module name="Checker">
|
||||
<module name="io.netty.build.checkstyle.SuppressionFilter">
|
||||
<property name="pattern" value="(LocalTimeProtocol|LinkedTransferQueue|Version|jzlib/.*|com/sun/nio/sctp/.*)\.java" />
|
||||
<!--
|
||||
<property name="pattern" value="(test[^/]*/.*|LocalTimeProtocol|LinkedTransferQueue|Version|jzlib/.*|com/sun/nio/sctp/.*)\.java" />
|
||||
-->
|
||||
</module>
|
||||
<module name="FileTabCharacter"/>
|
||||
<module name="JavadocPackage"/>
|
||||
@ -31,19 +34,37 @@
|
||||
<property name="format" value="^(\s|\*)*Copyright\s+[0-9]+\s+The Netty Project\s*$"/>
|
||||
<property name="minimum" value="1"/>
|
||||
<property name="maximum" value="1"/>
|
||||
<property name="message" value="missing copyright header"/>
|
||||
</module>
|
||||
<!-- Unmaintainable Javadoc tags -->
|
||||
<module name="RegexpSingleline">
|
||||
<property name="format" value="(@(author|version)|\(non-Javadoc\))"/>
|
||||
<property name="ignoreCase" value="true"/>
|
||||
<property name="message" value="unmaintainable Javadoc tags: @author, @version, or (non-Javadoc)"/>
|
||||
</module>
|
||||
<!-- Force UNIX line separator -->
|
||||
<module name="RegexpMultiline">
|
||||
<property name="format" value="\r"/>
|
||||
<property name="message" value="non-Unix line separator"/>
|
||||
</module>
|
||||
<!-- Trailing whitespace -->
|
||||
<module name="RegexpSingleline">
|
||||
<property name="format" value="\s+$"/>
|
||||
<property name="message" value="trailing whitespace"/>
|
||||
</module>
|
||||
<!-- Prohibit consecutive empty lines (except the lines after package/import) -->
|
||||
<module name="RegexpMultiline">
|
||||
<property name="format" value="\n *(?!package )(?!import )[^\n]+\n{3,}"/>
|
||||
<property name="message" value="two or more consecutive empty lines"/>
|
||||
</module>
|
||||
<!-- Prohibit an empty after { or before } -->
|
||||
<module name="RegexpMultiline">
|
||||
<property name="format" value="\n\n\s+\}[^\n]{0,10}\n"/>
|
||||
<property name="message" value="an empty line before '}'"/>
|
||||
</module>
|
||||
<module name="RegexpMultiline">
|
||||
<property name="format" value="\n\s+[^\n]{1,8}\{\n\n"/>
|
||||
<property name="message" value="an empty line after a short line that ends with '{'"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
|
Loading…
Reference in New Issue
Block a user