diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-11-30 16:50:13 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-11-30 22:14:08 +0400 |
commit | a07ede17801531d8deeaa609339b925653fefc8b (patch) | |
tree | 4b2fa0ecd745ad6ad00a6bd0402f6958722279a6 /plugins/sonar-pmd-plugin | |
parent | 735ed8bdf749b1034e2713abe37d8a7f27583244 (diff) | |
download | sonarqube-a07ede17801531d8deeaa609339b925653fefc8b.tar.gz sonarqube-a07ede17801531d8deeaa609339b925653fefc8b.zip |
SONAR-2819 Upgrade to PMD 4.3
New rules in PMD 4.3:
* DontCallThreadRun
* GuardDebugLogging
New rules in PMD 4.2.6:
* GenericsNaming
* AvoidCatchingGenericException
* AvoidLosingExceptionInformation
* AvoidLiteralsInIfCondition
* UseConcurrentHashMap
* DoNotHardCodeSDCard
Diffstat (limited to 'plugins/sonar-pmd-plugin')
-rw-r--r-- | plugins/sonar-pmd-plugin/pom.xml | 34 | ||||
-rw-r--r-- | plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml | 38 |
2 files changed, 40 insertions, 32 deletions
diff --git a/plugins/sonar-pmd-plugin/pom.xml b/plugins/sonar-pmd-plugin/pom.xml index 3b36b882e91..402b25ed125 100644 --- a/plugins/sonar-pmd-plugin/pom.xml +++ b/plugins/sonar-pmd-plugin/pom.xml @@ -14,24 +14,9 @@ <description>PMD is a tool that looks for potential problems like possible bugs, dead code, suboptimal code, overcomplicated expressions or duplicate code.</description> <properties> - <pmd.version>4.2.5.2</pmd.version> + <pmd.version>4.3</pmd.version> </properties> - <repositories> - <!-- for patched version of PMD (support of Java7) --> - <repository> - <id>sonar</id> - <name>Sonar</name> - <url>http://repository.sonarsource.org/content/repositories/sonar</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <dependencies> <dependency> <groupId>org.codehaus.sonar</groupId> @@ -44,8 +29,8 @@ <scope>provided</scope> </dependency> <dependency> - <groupId>com.sonarsource.pmd</groupId> - <artifactId>pmd-java7</artifactId> + <groupId>pmd</groupId> + <artifactId>pmd</artifactId> <version>${pmd.version}</version> <exclusions> <exclusion> @@ -106,19 +91,6 @@ <pluginClass>org.sonar.plugins.pmd.PmdPlugin</pluginClass> </configuration> </plugin> - <plugin> - <!-- TODO remove (see SONAR-2938) --> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-enforcer-plugin</artifactId> - <executions> - <execution> - <id>enforce-no-repositories</id> - <configuration> - <skip>true</skip> - </configuration> - </execution> - </executions> - </plugin> </plugins> </build> </project> diff --git a/plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml b/plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml index 7807310d803..961239cadef 100644 --- a/plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml +++ b/plugins/sonar-pmd-plugin/src/main/resources/org/sonar/plugins/pmd/rules.xml @@ -1,4 +1,40 @@ <rules> + <!-- PMD 4.3 --> + <rule key="DontCallThreadRun"> + <priority>MAJOR</priority> + <configKey>rulesets/basic.xml/DontCallThreadRun</configKey> + </rule> + <rule key="GuardDebugLogging"> + <priority>MAJOR</priority> + <configKey>rulesets/logging-jakarta-commons.xml/GuardDebugLogging</configKey> + </rule> + + <!-- PMD 4.2.6 --> + <rule key="GenericsNaming"> + <priority>MAJOR</priority> + <configKey>rulesets/naming.xml/GenericsNaming</configKey> + </rule> + <rule key="AvoidCatchingGenericException"> + <priority>MAJOR</priority> + <configKey>rulesets/strictexception.xml/AvoidCatchingGenericException</configKey> + </rule> + <rule key="AvoidLosingExceptionInformation"> + <priority>MAJOR</priority> + <configKey>rulesets/strictexception.xml/AvoidLosingExceptionInformation</configKey> + </rule> + <rule key="AvoidLiteralsInIfCondition"> + <priority>MAJOR</priority> + <configKey>rulesets/controversial.xml/AvoidLiteralsInIfCondition</configKey> + </rule> + <rule key="UseConcurrentHashMap"> + <priority>MAJOR</priority> + <configKey>rulesets/controversial.xml/UseConcurrentHashMap</configKey> + </rule> + <rule key="DoNotHardCodeSDCard"> + <priority>MAJOR</priority> + <configKey>rulesets/android.xml/DoNotHardCodeSDCard</configKey> + </rule> + <!-- PMD 4.2.5 --> <rule key="AvoidThrowingNewInstanceOfSameException"> <priority>MAJOR</priority> @@ -1785,4 +1821,4 @@ </param> </rule> -</rules>
\ No newline at end of file +</rules> |