com.qulice.pmd.ruleset.xml Maven / Gradle / Ivy
<?xml version="1.0"?> <!-- * * Copyright (c) 2011-2014, Qulice.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: 1) Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. 2) Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. 3) Neither the name of the Qulice.com nor * the names of its contributors may be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * @version $Id$ --> <ruleset name="Qulice Ruleset" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> <description> This ruleset checks code for potential mess </description> <rule ref="rulesets/java/basic.xml"> <exclude name="AvoidThreadGroup"/> </rule> <rule ref="rulesets/java/braces.xml"/> <rule ref="rulesets/java/clone.xml" /> <rule ref="rulesets/java/codesize.xml" /> <rule ref="rulesets/java/design.xml"/> <rule ref="rulesets/java/finalizers.xml"/> <rule ref="rulesets/java/imports.xml"/> <rule ref="rulesets/java/j2ee.xml"/> <rule ref="rulesets/java/javabeans.xml"/> <rule ref="rulesets/java/logging-java.xml"> <exclude name="GuardLogStatementJavaUtil"/> </rule> <rule ref="rulesets/java/optimizations.xml"/> <rule ref="rulesets/java/strings.xml"/> <rule ref="rulesets/java/sunsecure.xml"/> <rule ref="rulesets/java/unusedcode.xml"/> <rule ref="rulesets/java/coupling.xml"> <exclude name="LoosePackageCoupling"/> <exclude name="LawOfDemeter"/> </rule> <rule ref="rulesets/java/controversial.xml"> <exclude name="AtLeastOneConstructor"/> <exclude name="AvoidFinalLocalVariable"/> <exclude name="AvoidLiteralsInIfCondition"/> <exclude name="DataflowAnomalyAnalysis"/> </rule> <rule ref="rulesets/java/typeresolution.xml"> <exclude name="SignatureDeclareThrowsException"/> </rule> <rule ref="rulesets/java/junit.xml"> <exclude name="JUnitTestsShouldIncludeAssert"/> </rule> <rule ref="rulesets/java/naming.xml"> <exclude name="ShortClassName"/> <exclude name="ShortVariable"/> </rule> <rule ref="rulesets/java/strictexception.xml"> <exclude name="SignatureDeclareThrowsException"/> </rule> <rule ref="rulesets/jsp/basic-jsf.xml"/> <rule name="UnnecessaryLocalRule" message="Avoid creating unnecessary local variables like ''{0}''" class="com.qulice.pmd.rules.UnnecessaryLocalRule"> </rule> <rule name="ConstructorShouldDoInitialization" message="Avoid doing field initialization outside constructor." language="java" class="net.sourceforge.pmd.lang.rule.XPathRule"> <description> Avoid doing field initialization outside class constructor. Such initialization is allowed only when there is no constructor. </description> <properties> <property name="xpath"> <value> <![CDATA[ //ClassOrInterfaceBody [count(ClassOrInterfaceBodyDeclaration/ConstructorDeclaration)>0] [count(ClassOrInterfaceBodyDeclaration/FieldDeclaration/VariableDeclarator/VariableInitializer)>0] ]]> </value> </property> </properties> <priority>3</priority> </rule> </ruleset>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy