diff options
author | Maros Marsalek <mmarsale@cisco.com> | 2016-06-10 15:31:29 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-06-13 11:50:11 +0000 |
commit | 318b9e56d0b11a5ca4ea8da4879b4693bcf8763e (patch) | |
tree | 1ad8e338329a8525d1324cbbeac0a55b1342eb54 /common/checkstyle/src/main/resources/honeycomb-checkstyle-logging.xml | |
parent | 61d806977c78defd576a67a4c798856e02de7f9a (diff) |
Introduce coding style and checkstyle rules
Change-Id: I1e67065393cdb901b81d5c5f8f3cec42f1b39fc8
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'common/checkstyle/src/main/resources/honeycomb-checkstyle-logging.xml')
-rw-r--r-- | common/checkstyle/src/main/resources/honeycomb-checkstyle-logging.xml | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/common/checkstyle/src/main/resources/honeycomb-checkstyle-logging.xml b/common/checkstyle/src/main/resources/honeycomb-checkstyle-logging.xml new file mode 100644 index 000000000..79bdbfd7a --- /dev/null +++ b/common/checkstyle/src/main/resources/honeycomb-checkstyle-logging.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- + ~ Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. + ~ + --> + +<!DOCTYPE module PUBLIC + "-//Puppy Crawl//DTD Check Configuration 1.2//EN" + "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> + +<module name="Checker"> + + <property name="severity" value="error"/> + + <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="TreeWalker"> + <module name="org.opendaylight.yangtools.checkstyle.LoggerVariableModifiersCheck" /> + </module> + + <module name="TreeWalker"> + <module name="org.opendaylight.yangtools.checkstyle.LoggerMustBeSlf4jCheck" /> + </module> + + <module name="TreeWalker"> + <module name="org.opendaylight.yangtools.checkstyle.LoggerFactoryClassParameterCheck" /> + </module> + + <module name="TreeWalker"> + <module name="org.opendaylight.yangtools.checkstyle.LogMessageConcatenationCheck" /> + </module> + + <module name="TreeWalker"> + <module name="org.opendaylight.yangtools.checkstyle.LogMessagePlaceholderCountCheck" /> + </module> + + <module name="TreeWalker"> + <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>
\ No newline at end of file |