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>
</dependency>
</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>

View File

@ -20,22 +20,20 @@ import java.util.regex.Pattern;
import com.puppycrawl.tools.checkstyle.api.AuditEvent;
import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
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 {
private static final Pattern JAVA5PATTERN = Pattern.compile("/org/jboss/");
private Pattern pattern;
private Pattern examplePattern = Pattern.compile("examples?");
public void setPattern(String pattern) {
this.pattern = Pattern.compile(pattern);
}
public void setExamplePattern(String pattern) {
this.examplePattern = Pattern.compile(pattern);
examplePattern = Pattern.compile(pattern);
}
@Override
@ -46,7 +44,7 @@ public class SuppressionFilter extends AutomaticBean implements Filter {
return false;
}
}
if (pattern.matcher(filename).find()) {
return false;
}

View File

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