Fix broken CRLF rule / Check trailing whitespace
- Also removed unused imports
This commit is contained in:
parent
d5bae61655
commit
3a17bb6bc9
18
pom.xml
18
pom.xml
@ -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>
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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"/>
|
||||
|
Loading…
Reference in New Issue
Block a user