Top "Pmd" questions

PMD scans source code and looks for potential problems like possible bugs, dead code, suboptimal code, overcomplicated expressions, and duplicate code.

PMD Overridable method called during object construction

I have the following structure public class parent { int value ; } public class child extends parent { int childValue; public child(){} public …

java pmd
@SuppressWarnings more than one rule not working

PMD and SonarQube a nice tools but I have problems trying to suppress PMD warnings. We use Lombok a lot …

pmd sonarqube
The "Why" behind PMD's rules

Is there a good resource which describes the "why" behind PMD rule sets? PMD's site has the "what" - what …

pmd java code-analysis
Add an empty string vs toString - why is it bad?

According to the tool PMD, the following is a bad practice: String s = "" + 123; // bad String t = Integer.toString(456); // ok This …

java string tostring pmd
Can you exclude a source file for a specific PMD rule?

When defining a PMD ruleset is it possible to exclude a source file from a specific rule? I want to …

java pmd
PMD rule God Class - understanding the metrics

We are using the source code analyzer PMD in our Java project. I am trying to resolve the reported issues …

java pmd
Code analyzers: PMD & FindBugs

1. Regarding PMD: 1.1 How do I set the PMD checks, to ignore some of them, like "Variable name is too short, …

java eclipse eclipse-plugin findbugs pmd
Not able to install PMD in Eclipse Kepler

I have installed PMD in Eclipse Kepler using Eclipse market place. But I am unable to access it after the …

eclipse pmd eclipse-kepler
Avoid Literals In If Condition

This part of code is rejected by pmd in sonar: public String getFoo() { String foo = System.getProperty("foo"); if (foo == …

java sonarqube pmd
Running all PMD rulesets from command line

I want to know if there is a way to run all PMD rulesets from command line. I've used PMD …

pmd command-line-interface