| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- | |
| Licensed to the Apache Software Foundation (ASF) under one | |
| or more contributor license agreements. See the NOTICE file | |
| distributed with this work for additional information | |
| regarding copyright ownership. The ASF licenses this file | |
| to you under the Apache License, Version 2.0 (the | |
| "License"); you may not use this file except in compliance | |
| with the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, | |
| software distributed under the License is distributed on an | |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| KIND, either express or implied. See the License for the | |
| specific language governing permissions and limitations | |
| under the License. | |
| --> | |
| <ruleset name="CloudStack PMD Ruleset" | |
| xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"> | |
| <description> | |
| Ruleset that brings all the rulesets we want from the pmd jar, because | |
| the maven-pmd-plugin doesn't find them otherwise. This is also the place | |
| to add our own future rulesets, if any. | |
| </description> | |
| <rule ref="category/java/basic.xml"/> | |
| <rule ref="category/java/braces.xml"/> | |
| <rule ref="category/java/clone.xml"/> | |
| <rule ref="category/java/codesize.xml"/> | |
| <rule ref="category/java/comments.xml"> | |
| <!-- We shouldn't limit the number of lines in the header of a class --> | |
| <exclude name="CommentSize"/> | |
| <exclude name="CommentRequired" /> | |
| </rule> | |
| <rule ref="category/java/controversial.xml"> | |
| <!-- The rule is good, but is not properly applied. It forces you to statically declare it as ConcurrentHashMap --> | |
| <exclude name="UseConcurrentHashMap"/> | |
| <exclude name="CallSuperInConstructor"/> | |
| <exclude name="AtLeastOneConstructor"/> | |
| <exclude name="AssignmentInOperand"/> | |
| <exclude name="NullAssignment"/> | |
| <exclude name="DataflowAnomalyAnalysis" /> | |
| <exclude name="UseObjectForClearerAPI" /> | |
| </rule> | |
| <rule ref="category/java/coupling.xml"> | |
| <exclude name="ExcessiveImports" /> | |
| <exclude name="LawOfDemeter"/> | |
| </rule> | |
| <rule ref="category/java/design.xml"> | |
| <exclude name="ConstructorCallsOverridableMethod"/> | |
| <exclude name="AbstractClassWithoutAbstractMethod"/> | |
| <exclude name="AvoidSynchronizedAtMethodLevel"/> | |
| </rule> | |
| <rule ref="category/java/empty.xml"/> | |
| <rule ref="category/java/finalizers.xml"/> | |
| <rule ref="category/java/imports.xml"/> | |
| <rule ref="category/java/j2ee.xml"/> | |
| <rule ref="category/java/junit.xml"/> | |
| <rule ref="category/java/logging-java.xml"/> | |
| <rule ref="category/java/naming.xml"> | |
| <exclude name="ShortVariable"/> | |
| <exclude name="AbstractNaming"/> | |
| </rule> | |
| <rule ref="category/java/naming.xml/LongVariable"> | |
| <properties> | |
| <property name="minimum" value="32"/> | |
| </properties> | |
| </rule> | |
| <rule ref="category/java/optimizations.xml"/> | |
| <rule ref="category/java/strictexception.xml"/> | |
| <rule ref="category/java/strings.xml"/> | |
| <rule ref="category/java/sunsecure.xml"/> | |
| <rule ref="category/java/typeresolution.xml"/> | |
| <rule ref="category/java/unnecessary.xml"/> | |
| <rule ref="category/java/unusedcode.xml"/> | |
| </ruleset> |