Remove all not directly custom Logger check related modules declarations 17/39417/3
authorMichael Vorburger <vorburger@redhat.com>
Wed, 25 May 2016 14:17:54 +0000 (16:17 +0200)
committerMichael Vorburger <vorburger@redhat.com>
Thu, 2 Jun 2016 19:52:55 +0000 (19:52 +0000)
All of these are now in odlparent.checkstyle odl_checks.xml; see
https://git.opendaylight.org/gerrit/#/c/39416/

Change-Id: I47e11df8bacd2685f1b7d52bb4cef2e03f54460d
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
common/checkstyle-logging/src/main/resources/checkstyle-logging.xml
common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckCodingStyleTestClass.java [deleted file]
common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckstyleTest.java

index b404a3e6bee0aae1f1ea2d8160f038423a3ed3f1..c8173b8dd899748bf0cf5a628efc0a5622dad77b 100644 (file)
@@ -5,16 +5,6 @@
 
 <module name="Checker">
 
-    <module name="RegexpMultiline">
-        <property name="format" value="System\.(out)|(err)\.print(ln)?\("/>
-        <property name="message" value="Line contains console output."/>
-    </module>
-
-    <module name="RegexpMultiline">
-        <property name="format" value="\.printStackTrace?\("/>
-        <property name="message" value="Line contains printStacktrace()."/>
-    </module>
-
     <module name="TreeWalker">
         <module name="org.opendaylight.yangtools.checkstyle.LoggerVariableNameCheck" />
     </module>
         <module name="org.opendaylight.yangtools.checkstyle.LoggerDeclarationsCountCheck"/>
     </module>
 
-    <module name="FileTabCharacter">
-        <property name="eachLine" value="true"/>
-    </module>
-
-    <module name="RegexpSingleline">
-        <property name="format" value="\s+$"/>
-        <property name="message" value="Line has trailing spaces."/>
-    </module>
-
-    <module name="RegexpMultiline">
-        <property name="format" value="(\r\n|\r)"/>
-        <property name="message" value="Line has Windows line delimiter."/>
-    </module>
-
-    <module name="TreeWalker">
-        <module name="Indentation">
-            <property name="caseIndent" value="0"/>
-            <property name="throwsIndent" value="8"/>
-        </module>
-
-        <module name="UnusedImports"/>
-
-        <module name="ImportOrder">
-            <property name="ordered" value="true"/>
-            <property name="separated" value="true"/>
-            <property name="option" value="above"/>
-        </module>
-    </module>
 </module>
\ No newline at end of file
diff --git a/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckCodingStyleTestClass.java b/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckCodingStyleTestClass.java
deleted file mode 100644 (file)
index 8719c42..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*\r
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-\r
-package org.opendaylight.yangtools.checkstyle;\r
-\r
-import java.util.Comparator;\r
-import java.util.Map;\r
-\r
-import static java.lang.String.CASE_INSENSITIVE_ORDER;\r
-\r
-import com.google.common.collect.Maps;\r
-import com.google.common.collect.Lists;\r
-\r
-public class CheckCodingStyleTestClass {\r
-        // NOTE:  This test class contains intentional checkstyle issues\r
-       public CheckCodingStyleTestClass() {\r
-               Comparator<String> string = CASE_INSENSITIVE_ORDER; \r
-               \r
-          Map<String, String> map = Maps.newHashMap();\r
-       }\r
-}\r
index 977b61a9c9ce5fe46f3b642338e893cb01ec4e61..df132ab6a9ce295355053908e71246932a19a556 100644 (file)
@@ -60,25 +60,11 @@ public class CheckstyleTest {
                 "16: LoggerFactory.getLogger Class argument is incorrect",
                 "18: Logger might be declared only once",
                 "17: Logger must be slf4j",
-                "23: Line contains printStacktrace",
-                "24: Line contains console output",
-                "25: Line contains console output",
                 "27: Log message placeholders count is incorrect",
                 "33: Log message placeholders count is incorrect",
                 "42: Log message contains string concatenation");
     }
 
-    @Test
-    public void testCodingChecks() throws Exception {
-        verify(CheckCodingStyleTestClass.class, false,
-                "9: Line has Windows line delimiter.",
-                "14: Wrong order for",
-                "24:1: Line contains a tab character.",
-                "22: Line has trailing spaces.",
-                "22: 'ctor def' child have incorrect indentation level 16, expected level should be 8.",
-                "17:8: Unused import",
-                "23: Line has trailing spaces.");
-    }
 
     private void verify(final Class<?> testClass, final boolean checkCount, final String... expectedMessages) throws CheckstyleException {
         final String filePath = System.getProperty("user.dir") + File.separator + "src" + File.separator + "test" + File.separator + "java" + File.separator + testClass.getName().replaceAll("\\.", "/") + ".java";