From ac6eebe7bb94e05ed8e27b1591713590d7650f39 Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Wed, 25 May 2016 16:17:54 +0200 Subject: [PATCH] Remove all not directly custom Logger check related modules declarations 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 --- .../src/main/resources/checkstyle-logging.xml | 38 ------------------- .../checkstyle/CheckCodingStyleTestClass.java | 26 ------------- .../yangtools/checkstyle/CheckstyleTest.java | 14 ------- 3 files changed, 78 deletions(-) delete mode 100644 common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckCodingStyleTestClass.java diff --git a/common/checkstyle-logging/src/main/resources/checkstyle-logging.xml b/common/checkstyle-logging/src/main/resources/checkstyle-logging.xml index b404a3e6be..c8173b8dd8 100644 --- a/common/checkstyle-logging/src/main/resources/checkstyle-logging.xml +++ b/common/checkstyle-logging/src/main/resources/checkstyle-logging.xml @@ -5,16 +5,6 @@ - - - - - - - - - - @@ -43,32 +33,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ 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 index 8719c42528..0000000000 --- a/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckCodingStyleTestClass.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.yangtools.checkstyle; - -import java.util.Comparator; -import java.util.Map; - -import static java.lang.String.CASE_INSENSITIVE_ORDER; - -import com.google.common.collect.Maps; -import com.google.common.collect.Lists; - -public class CheckCodingStyleTestClass { - // NOTE: This test class contains intentional checkstyle issues - public CheckCodingStyleTestClass() { - Comparator string = CASE_INSENSITIVE_ORDER; - - Map map = Maps.newHashMap(); - } -} diff --git a/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckstyleTest.java b/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckstyleTest.java index 977b61a9c9..df132ab6a9 100644 --- a/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckstyleTest.java +++ b/common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/CheckstyleTest.java @@ -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"; -- 2.36.6