Comments (3)
Hi Michael!
I started eclipse-pmd a couple of years ago because I wanted a PMD Plugin that was easy to use for development teams and "PMD Eclipse Plugin" made it quite hard to keep the PMD configuration in sync within a team (I don't know if that is still the case since I haven't used the "PMD Eclipse Plugin" for years).
I designed eclipse-pmd so it is really easy to have only a single source for the PMD rule set(s). If you put the rule set file into your code repository you can share it with your whole team and changes are picked up by the plugin automatically. And since its the same file format that PMD uses, the same rule set file can be used for the build (Maven, Gradle etc.) and on you CI server.
I also wanted the plugin to be out of your way as much as possible. A developer should not have to remember to run PMD when writing code - the plugin should do it automatically. So I designed eclipse-pmd in a way that once you point it to your rule set file you don't have to do anything else. It will analyse a file when you save and give you feedback immediately so you can fix the issues right when you introduced them.
eclipse-pmd also offers quite a few quick-fixes for the issues PMD finds. This helps a lot when you start using PMD on an already existing project. It also shows less experienced developers how to fix those issues.
As for CPD: eclipse-pmd does not support it (yet). It won't run CPD automatically and you also can't run it manually. It's not because I don't like CPD, it's just a result of my limited time. Although I'm not sure if CPD is the right tool to find duplicated code for Eclipse. As far as I know CPD can only analyse the whole code base at once and not incrementally. This makes it difficult to analyse the code while you write it. I quite like the way IntelliJ IDEA works: as soon as you have written (or copy/pasted) a piece of code it lets you know that this code is duplicated. This will probably only be possible if we could analyse the code incrementally.
I know of m2e-code-quality and would like to see it use eclipse-pmd. Unfortunately I have already enough to do with eclipse-pmd itself. But if you want m2e-code-quality to use eclipse-pmd (or at least offer it as an option) then you should open a new issue at their project. Maybe someone else will pick it up.
And finally, in my totally unbiased opinion: you should definitely switch your project from pmd-eclipse-plugin to eclipse-pmd ;-)
from eclipse-pmd.
If you put the rule set file into your code repository you can share it with your whole team and changes are picked up by the plugin automatically.
How do you find the configuration? In a big project with many modules (i.e. Maven projects), just checking in the root of the respective Eclipse projects isn't viable, and you have to be able to share such configurations somehow. Maven parent pom.xml are one way to do this in a big code base of course.
eclipse-pmd also offers quite a few quick-fixes for the issues PMD finds.
That's nice!
I know of m2e-code-quality and would like to see it use eclipse-pmd. Unfortunately I have already enough to do with eclipse-pmd itself. But if you want m2e-code-quality to use eclipse-pmd (or at least offer it as an option) then you should open a new issue at their project.
Sure... m2e-code-quality/m2e-code-quality#96 ;-)
from eclipse-pmd.
Regarding the configuration, I usually put it in the same place as the parent pom. In a simple single pom project I put it in a config folder. But you are free to put it wherever you think it fits best as eclipse-pmd can be configured accordingly.
from eclipse-pmd.
Related Issues (20)
- An error occurred while automatically activating bundle ch.acanda.eclipse.pmd.core HOT 3
- Eclipse Neon (4.6) install through marked but nothing shows up HOT 2
- Improve ruleset feedback HOT 2
- Remote ruleset: rules caching/refresh frequency? HOT 2
- Automatically update workspace relative configurations when the project name changes
- The rule set configuration at the given location is invalid HOT 9
- Eclipse PDT. Cannot change PMD nature of project <projectName> HOT 2
- New releases HOT 3
- Release 1.9 HOT 9
- XML parsing problem in Eclipse Oxygen HOT 1
- NoClassDefFoundError with version 1.12 in Eclipse Photon
- pmd can not find my enum class (configure auxclasspath) HOT 2
- eclipse-pmd 1.14 depends on pmd 6.6.0 and asm 6.1.1, but pmd 6.6.0 depends on asm 6.2 HOT 1
- Cannot use apex rules HOT 1
- Problem installing on STS 4 HOT 2
- Bug: After importing an exising project, no more PMD checks were performed HOT 2
- Bug: ruleset of other projects are also listed HOT 2
- Developer should be able to exclude violation HOT 4
- Use Rulesets with unkonwn rules (from newer PMD versions) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipse-pmd.