Fix broken CRLF rule / Check trailing whitespace

- Also removed unused imports
This commit is contained in:
Trustin Lee 2012-06-08 11:16:03 +09:00
parent d5bae61655
commit 3a17bb6bc9
3 changed files with 30 additions and 8 deletions

18
pom.xml
View File

@ -73,5 +73,23 @@
<version>5.5</version> <version>5.5</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.6</source>
<target>1.6</target>
<debug>true</debug>
<optimize>true</optimize>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -20,8 +20,6 @@ import java.util.regex.Pattern;
import com.puppycrawl.tools.checkstyle.api.AuditEvent; import com.puppycrawl.tools.checkstyle.api.AuditEvent;
import com.puppycrawl.tools.checkstyle.api.AutomaticBean; import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
import com.puppycrawl.tools.checkstyle.api.Filter; import com.puppycrawl.tools.checkstyle.api.Filter;
import com.puppycrawl.tools.checkstyle.api.FilterSet;
import com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocPackageCheck;
public class SuppressionFilter extends AutomaticBean implements Filter { public class SuppressionFilter extends AutomaticBean implements Filter {
@ -35,7 +33,7 @@ public class SuppressionFilter extends AutomaticBean implements Filter {
} }
public void setExamplePattern(String pattern) { public void setExamplePattern(String pattern) {
this.examplePattern = Pattern.compile(pattern); examplePattern = Pattern.compile(pattern);
} }
@Override @Override

View File

@ -26,19 +26,25 @@
<module name="NewlineAtEndOfFile"> <module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf" /> <property name="lineSeparator" value="lf" />
</module> </module>
<!-- Copyright headers -->
<module name="RegexpSingleline"> <module name="RegexpSingleline">
<property name="format" value="^(\s|\*)*Copyright\s+[0-9]+\s+The Netty Project\s*$"/> <property name="format" value="^(\s|\*)*Copyright\s+[0-9]+\s+The Netty Project\s*$"/>
<property name="minimum" value="1"/> <property name="minimum" value="1"/>
<property name="maximum" value="1"/> <property name="maximum" value="1"/>
</module> </module>
<!-- Unmaintainable Javadoc tags -->
<module name="RegexpSingleline"> <module name="RegexpSingleline">
<property name="format" value="(@(author|version)|\(non-Javadoc\))"/> <property name="format" value="(@(author|version)|\(non-Javadoc\))"/>
<property name="ignoreCase" value="true"/> <property name="ignoreCase" value="true"/>
</module> </module>
<!-- Force UNIX line separator --> <!-- Force UNIX line separator -->
<module name="RegexpSingleline"> <module name="RegexpMultiline">
<property name="format" value="\r"/> <property name="format" value="\r"/>
</module> </module>
<!-- Trailing whitespace -->
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
</module>
<module name="TreeWalker"> <module name="TreeWalker">
<module name="WhitespaceAfter"/> <module name="WhitespaceAfter"/>