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>
|
<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>
|
||||||
|
|
||||||
|
@ -20,22 +20,20 @@ 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 {
|
||||||
|
|
||||||
private static final Pattern JAVA5PATTERN = Pattern.compile("/org/jboss/");
|
private static final Pattern JAVA5PATTERN = Pattern.compile("/org/jboss/");
|
||||||
|
|
||||||
private Pattern pattern;
|
private Pattern pattern;
|
||||||
private Pattern examplePattern = Pattern.compile("examples?");
|
private Pattern examplePattern = Pattern.compile("examples?");
|
||||||
|
|
||||||
public void setPattern(String pattern) {
|
public void setPattern(String pattern) {
|
||||||
this.pattern = Pattern.compile(pattern);
|
this.pattern = Pattern.compile(pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setExamplePattern(String pattern) {
|
public void setExamplePattern(String pattern) {
|
||||||
this.examplePattern = Pattern.compile(pattern);
|
examplePattern = Pattern.compile(pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -46,7 +44,7 @@ public class SuppressionFilter extends AutomaticBean implements Filter {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pattern.matcher(filename).find()) {
|
if (pattern.matcher(filename).find()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -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"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user