yalov
yalov

Reputation: 575

NetBeans (maven) project: checkstyle-beans vs maven-checkstyle-plugin

There are at least two ways of using the checkstyle in the NetBean maven project
(at the time of 2019-07-24):

The last version of the github.com/checkstyle itself is v8.22

Questions:

  1. Can I update them both to the last checkstyle?
  2. Does they completely independent ?
    • the checkstyle-beans shows the marks beside the line numbers in the IDE
    • the maven-checkstyle-plugin can be used for the manual launch in the console, outside the IDE (mvn -e checkstyle:check).
      Can it be configured and used inside the IDE ?

Upvotes: 1

Views: 869

Answers (1)

barfuin
barfuin

Reputation: 17494

As a Netbeans user, you are stuck with Checkstyle-Beans as far as in-IDE support goes. Maven and Checkstyle-Beans are completely independent of each other, but both depend on Checkstyle, of which they should use the same version.
This means you are also stuck with Checkstyle 6.15 (no upgrade unless Checkstyle-Beans gets a new version), which you must consequently use everywhere else also, or your Checkstyle configuration will not work (for example Checkstyle 6.15 config XMLs won't work with Checkstyle 8.22).

So, you have three options:

  • Use a different IDE, such as IntelliJ or Eclipse. Both have up-to-date Checkstyle support, so you can use the latest Checkstyle both in Maven and in the IDE.
  • Continue with Netbeans, and use Checkstyle 6.15. This is actually feasible imho. Checkstyle docs are versioned these days, so you can see the correct docs at https://checkstyle.sourceforge.io/version/6.15/. This will get you Checkstyle 6.15 support in Maven and in the IDE.
  • Continue with Netbeans, and use latest Checkstyle. Then you can only run it via Maven, but I suppose you can configure a button in NetBeans to make this easy.

Upvotes: 2

Related Questions