From 19c2c0edae38d93402d8c3912b8dae54e07b20db Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Wed, 25 May 2016 14:58:03 +0200 Subject: [PATCH] New LogMessageExtractorCheck which writes out TXT report of all loggers Change-Id: I853c742901131293c58c78bea821fe0d12957f07 Signed-off-by: Michael Vorburger --- common/checkstyle-logging/pom.xml | 12 +++ .../checkstyle/AbstractLogMessageCheck.java | 48 +++++++++++ .../checkstyle/CheckLoggingUtil.java | 14 ++++ .../yangtools/checkstyle/FileNameUtil.java | 52 ++++++++++++ .../checkstyle/LogMessageExtractorCheck.java | 82 +++++++++++++++++++ .../LogMessagePlaceholderCountCheck.java | 31 +++---- .../src/main/resources/checkstyle-logging.xml | 4 + .../checkstyle/CheckLoggingTestClass.java | 3 + .../yangtools/checkstyle/CheckstyleTest.java | 17 +++- .../checkstyle/FileNameUtilTest.java | 21 +++++ 10 files changed, 261 insertions(+), 23 deletions(-) create mode 100644 common/checkstyle-logging/src/main/java/org/opendaylight/yangtools/checkstyle/AbstractLogMessageCheck.java create mode 100644 common/checkstyle-logging/src/main/java/org/opendaylight/yangtools/checkstyle/FileNameUtil.java create mode 100644 common/checkstyle-logging/src/main/java/org/opendaylight/yangtools/checkstyle/LogMessageExtractorCheck.java create mode 100644 common/checkstyle-logging/src/test/java/org/opendaylight/yangtools/checkstyle/FileNameUtilTest.java diff --git a/common/checkstyle-logging/pom.xml b/common/checkstyle-logging/pom.xml index 4628cf1216..53467208a9 100644 --- a/common/checkstyle-logging/pom.xml +++ b/common/checkstyle-logging/pom.xml @@ -42,6 +42,18 @@ + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + checkstyle.violationSeverity=error + + + + +