walkmod-pmd-plugin

Walkmod plugin to automatically fix the reported problems by PMD

License

License

Categories

Categories

PMD Application Testing & Monitoring Code Analysis
GroupId

GroupId

org.walkmod
ArtifactId

ArtifactId

walkmod-pmd-plugin
Last Version

Last Version

2.0.9
Release Date

Release Date

Type

Type

jar
Description

Description

walkmod-pmd-plugin
Walkmod plugin to automatically fix the reported problems by PMD
Project URL

Project URL

https://github.com/walkmod/walkmod-pmd-plugin
Source Code Management

Source Code Management

https://github.com/walkmod/walkmod-pmd-plugin

Download walkmod-pmd-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/org.walkmod/walkmod-pmd-plugin/ -->
<dependency>
    <groupId>org.walkmod</groupId>
    <artifactId>walkmod-pmd-plugin</artifactId>
    <version>2.0.9</version>
</dependency>
// https://jarcasting.com/artifacts/org.walkmod/walkmod-pmd-plugin/
implementation 'org.walkmod:walkmod-pmd-plugin:2.0.9'
// https://jarcasting.com/artifacts/org.walkmod/walkmod-pmd-plugin/
implementation ("org.walkmod:walkmod-pmd-plugin:2.0.9")
'org.walkmod:walkmod-pmd-plugin:jar:2.0.9'
<dependency org="org.walkmod" name="walkmod-pmd-plugin" rev="2.0.9">
  <artifact name="walkmod-pmd-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.walkmod', module='walkmod-pmd-plugin', version='2.0.9')
)
libraryDependencies += "org.walkmod" % "walkmod-pmd-plugin" % "2.0.9"
[org.walkmod/walkmod-pmd-plugin "2.0.9"]

Dependencies

compile (8)

Group / Artifact Type Version
net.sourceforge.pmd : pmd-core jar 5.5.2
net.sourceforge.pmd : pmd-java jar 5.5.2
net.sourceforge.pmd : pmd-javascript jar 5.5.2
net.sourceforge.pmd : pmd-jsp jar 5.5.2
net.sourceforge.pmd : pmd-plsql jar 5.5.2
org.walkmod : javalang jar [4.5.0, 5.0)
org.walkmod : javalang-compiler jar [2.0, 3.0)
org.walkmod : walkmod-core jar [2.0.0,4.0.0)

test (2)

Group / Artifact Type Version
org.walkmod : walkmod-javalang-plugin jar [2.7.2, 4.0)
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

walkmod-pmd-plugin

Build Status

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.

org.walkmod

walkmod

Versions

Version
2.0.9
2.0.8
2.0.7
2.0.6
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.1.1
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0