diff --git a/.settings/edu.umd.cs.findbugs.core.prefs b/.settings/edu.umd.cs.findbugs.core.prefs index 4a52bda830658417044b4c1385cc999ea27535b3..95ebb894bcc0f34ec37dfe7edfecc7826c272b1f 100644 --- a/.settings/edu.umd.cs.findbugs.core.prefs +++ b/.settings/edu.umd.cs.findbugs.core.prefs @@ -1,5 +1,5 @@ #FindBugs User Preferences -#Tue Apr 21 14:08:24 CEST 2015 +#Tue Apr 21 14:15:57 CEST 2015 detector_threshold=3 effort=max excludefilter0=.fbExcludeFilterFile|true diff --git a/pom.xml b/pom.xml index 77e567ab0c2fb2a3b1fd0eaea94fc20248b8a022..19dfa4b7c27ca2d25df158dc21aa356b7e9692ad 100644 --- a/pom.xml +++ b/pom.xml @@ -127,12 +127,6 @@ <!-- SNAPSHOT master version --> <version>7239659ba0</version> </dependency> - - <dependency> - <groupId>com.puppycrawl.tools</groupId> - <artifactId>checkstyle</artifactId> - <version>6.5</version> - </dependency> <dependency> <groupId>com.carrotsearch</groupId> @@ -152,11 +146,6 @@ <format>html</format> <format>xml</format> </formats> - <instrumentation> - <excludes> - <exclude>src/performancetest/**/*</exclude> - </excludes> - </instrumentation> </configuration> </plugin> <!-- we want JDK 1.6 source and binary compatibility --> diff --git a/src/test/java/qa/cs/PluralForCollectionVariable.java b/src/test/java/qa/cs/PluralForCollectionVariable.java deleted file mode 100644 index 85845dd0b594312098a19355fe2b99e82f457456..0000000000000000000000000000000000000000 --- a/src/test/java/qa/cs/PluralForCollectionVariable.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed 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. - */ -package qa.cs; - -import java.util.HashSet; -import java.util.Set; - -import com.puppycrawl.tools.checkstyle.api.Check; -import com.puppycrawl.tools.checkstyle.api.DetailAST; -import com.puppycrawl.tools.checkstyle.api.TokenTypes; - -public class PluralForCollectionVariable extends Check { - - private final Set<String> collectionNames = new HashSet<String>(); - - public PluralForCollectionVariable() { - collectionNames.add("Collection"); - collectionNames.add("Set"); - collectionNames.add("List"); - } - - @Override - public int[] getDefaultTokens() { - return new int[] { TokenTypes.VARIABLE_DEF }; - } - - @Override - public void visitToken(final DetailAST ast) { - DetailAST typeAst = ast.findFirstToken(TokenTypes.TYPE); - DetailAST identifierAst = ast.findFirstToken(TokenTypes.IDENT); - - DetailAST actualTypeAst = typeAst.getFirstChild(); - DetailAST typeArgumentsAst = actualTypeAst.getNextSibling(); - String actualTypeName = actualTypeAst.getText(); - if (collectionNames.contains(actualTypeName)) { - String identifierName = identifierAst.getText(); - if (!identifierName.endsWith("s")) { - String message = "The variable '" + identifierName + "' should be named in plural since it represents a " + actualTypeName + " of " - + typeArgumentsAst.getText(); - log(ast.getLineNo(), message); - } - } - } - -}