https://github.com/walkmod/walkmod-pmd-plugin
Walkmod plugin to fix the code according the PMD rules
https://github.com/walkmod/walkmod-pmd-plugin
Last synced: 5 months ago
JSON representation
Walkmod plugin to fix the code according the PMD rules
- Host: GitHub
- URL: https://github.com/walkmod/walkmod-pmd-plugin
- Owner: walkmod
- Created: 2016-01-18T06:45:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-08-15T03:07:16.000Z (almost 4 years ago)
- Last Synced: 2024-04-16T20:18:48.354Z (about 2 years ago)
- Language: Java
- Size: 281 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.asciidoc
Awesome Lists containing this project
README
walkmod-pmd-plugin
==================
Raquel Pau
image:https://travis-ci.org/walkmod/walkmod-pmd-plugin.svg?branch=master["Build Status", link="https://travis-ci.org/walkmod/walkmod-pmd-plugin"]
This is a walkmod plugin to automatically correct those PMD rules that have a unique resolution. Currently, the supported rules are:
----
- basic/AvoidMultipleUnaryOperators
- basic/AvoidUsingOctalValues
- basic/AvoidUsingOctalValues
- basic/BigIntegerInstantiation
- basic/BooleanInstantiation
- basic/BrokenNullCheck
- basic/CheckResultSet
- basic/DontCallThreadRun
- basic/DoubleCheckedLocking
- basic/ExtendsObject
- basic/ForLoopShouldBeWhileLoop
- basic/MisplacedNullCheck
- basic/OverrideBothEqualsAndHashcode
- basic/ReturnFromFinallyBlock
- basic/SimplifiedTernary
- basic/UnconditionalIfStatement
----
== Usage
1) Verify that your walkmod version is > = 2.2.0
2) Execute the following command to add this code transformation plugin as part of your conventions.
----
walkmod add pmd -DconfigurationFile='my-pmd-file.xml'
----
3) Now, You see the results, executing:
----
walkmod apply
----
Or, alternatively, you can also check which would be the modified classes typing:
----
walkmod check
----
== Contributing
If you want to hack on this, fork it, improve it and send me a pull request.
To get started using it, just clone it and call mvn install.