Initial import

This commit is contained in:
Trustin Lee 2012-01-11 20:36:30 +09:00
commit 3b806a4833
4 changed files with 195 additions and 0 deletions

12
.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
.project
.classpath
.settings
*.iml
*.ipr
*.iws
.geany
/target
*/target
/reports
*/reports

77
pom.xml Normal file
View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2011 The Netty Project
~
~ The Netty Project licenses this file to you under the Apache License,
~ version 2.0 (the "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at:
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
~ License for the specific language governing permissions and limitations
~ under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
<relativePath></relativePath>
</parent>
<groupId>io.netty</groupId>
<artifactId>netty-build</artifactId>
<packaging>jar</packaging>
<version>1-SNAPSHOT</version>
<name>Netty/Build</name>
<url>http://netty.io/</url>
<description>
Resources required to build Netty
</description>
<organization>
<name>The Netty Project</name>
<url>http://netty.io/</url>
</organization>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<inceptionYear>2008</inceptionYear>
<scm>
<url>https://github.com/netty/netty</url>
<connection>scm:git:git://github.com/netty/netty.git</connection>
<developerConnection>scm:git:ssh://git@github.com/netty/netty.git</developerConnection>
</scm>
<developers>
<developer>
<id>netty.io</id>
<name>The Netty Project Contributors</name>
<email>netty@googlegroups.com</email>
<url>http://netty.io/</url>
<organization>The Netty Project</organization>
<organizationUrl>http://netty.io/</organizationUrl>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>5.5</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,23 @@
package io.netty.build.checkstyle;
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;
public class SuppressionFilter extends AutomaticBean implements Filter {
private FilterSet filters = new FilterSet();
private Pattern pattern;
public void setPattern(String pattern) {
this.pattern = Pattern.compile(pattern);
}
@Override
public boolean accept(AuditEvent evt) {
return !pattern.matcher(evt.getFileName()).find();
}
}

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="io.netty.build.checkstyle.SuppressionFilter">
<property name="pattern" value="(test[^/]*/.*|LocalTimeProtocol|LinkedTransferQueue|jzlib/.*|com/sun/nio/sctp/.*)\.java" />
</module>
<module name="FileTabCharacter"/>
<module name="JavadocPackage"/>
<module name="NewlineAtEndOfFile"/>
<module name="RegexpSingleline">
<property name="format" value="@(author|version)"/>
<property name="ignoreCase" value="true"/>
</module>
<module name="TreeWalker">
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND, DEC, INC"/>
</module>
<!-- Commented out due to false positives.
<module name="MissingDeprecated"/>
-->
<module name="MissingOverride"/>
<module name="PackageAnnotation"/>
<module name="EmptyBlock">
<property name="option" value="text"/>
</module>
<module name="LeftCurly"/>
<module name="RightCurly"/>
<module name="NeedBraces"/>
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true"/>
</module>
<module name="FinalClass"/>
<module name="InterfaceIsType"/>
<module name="HideUtilityClassConstructor"/>
<module name="CovariantEquals"/>
<module name="DoubleCheckedLocking"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<!--
<module name="FinalLocalVariable"/>
-->
<module name="RedundantThrows">
<property name="logLoadErrors" value="false"/>
<property name="suppressLoadErrors" value="true"/>
</module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="NoFinalizer"/>
<module name="SuperClone"/>
<module name="SuperFinalize"/>
<module name="PackageDeclaration"/>
<module name="ExplicitInitialization"/>
<module name="DefaultComesLast"/>
<module name="UnnecessaryParentheses"/>
<module name="AvoidStarImport">
<property name="allowStaticMemberImports" value="true"/>
</module>
<module name="RedundantImport"/>
<!-- Commented out due to false positives.
<module name="UnusedImports">
<property name="processJavadoc" value="true"/>
</module>
-->
<module name="JavadocStyle">
<property name="checkFirstSentence" value="false"/>
</module>
<module name="UpperEll"/>
<module name="ArrayTypeStyle"/>
<module name="OuterTypeFilename"/>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="GenericWhitespace"/>
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="MethodParamPad"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
</module>
</module>