Git Product home page Git Product logo

Comments (3)

acanda avatar acanda commented on September 24, 2024

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.

vorburger avatar vorburger commented on September 24, 2024

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.

acanda avatar acanda commented on September 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.