Skip to content

.checkstyle isn't created #210

Open
Open

Description

@vghero

I'm using Eclipse 2018-12 together with the latest version of the m2e code quality plugin.
There exists the problem, that the checkstyle config seems not properly read from the maven pom.xml and saved as .checkstyle file in the project. The latter file simply isn't created.

m2e code quality plugin version is: 1.1.3.201903061028-r
Eclipse checkstyle plugin version is: 8.12.0.201808161509
maven-checkstyle-plugin version is: 3.0.0 together with checkstyle 8.11

The configs for PMD and Findbugs just seem to work fine. .pmd and friends get created.
Executing mvn also performs checkstyle checks as expected.

Any clue what might be wrong?

Activity

  1. vorburger commented on Mar 9, 2019

    @vorburger
    Member
  2. vghero commented on Mar 11, 2019

    @vghero
    Author

    To put it simply: it just doesn't work :D. That the .checkstyle isn't created, is just something I encountered. Because in the past it was there and checkstyle was working (Eclipse Oxygen/Mars etc.).
    Is there any log where any problems are reported to?

  3. vorburger commented on Mar 11, 2019

    @vorburger
    Member
  4. andreasaba68 commented on Apr 16, 2019

    @andreasaba68

    Hi @vghero

    I was having a similar issue (and no messages on the Errors logs) and then realized that I had forgotten to include the "check" goal in my pom.
    A further suggestion in case it's not that simple, is to try by:

    I hope this helps.

  5. vghero commented on Apr 17, 2019

    @vghero
    Author

    Thank you very much for the insights! I will investigate with the steps you suggested. And funnily: we also have the boot parent pom. Maybe it's really related to that, thanks!

  6. andreasaba68 commented on Apr 17, 2019

    @andreasaba68

    @vghero apologies for deleting my previous post, I will now post it back:

    what I described above worked with the pom in checkstyle-9 example but when I applied it to my real project it didn't work anymore so I decided to do more investigation.
    I pulled all components of my project one by one and eventually m2e-quality-tools seems not to be working when the spring-boot parent pom is included, probably there is some compatibility problem.

    ======
    ... and add something:

    • my pom's "header":
      <parent>
      	<groupId>org.springframework.boot</groupId>
      	<artifactId>spring-boot-starter-parent</artifactId>
      	<version>2.1.3.RELEASE</version>
      	<relativePath />
      </parent>

    is definitely interfering with the m2e-quality-tools plugin, I tried by put/pull it various times in a small project I had created on purpose.

    I have found a workaround which I hope may be useful:

    • in my regular spring-boot project I pulled the parent header (even if that arises compiling issues)
    • I made sure checkstyle was not active for the project and removed the .checkstyle file
    • I run the "update maven project" (I think this may not be indispensable)
      then checkstyle looked well configured in eclipse too.
      Now what I mean to do is, to push the .checkstyle eclipse config file on git too, as it may be hard to follow that process all the time for all devs, and I will just do it myself when I feel that the configuration may need an update.

    Hope this helps!

  7. andreasaba68 commented on Apr 17, 2019

    @andreasaba68

    Now if you also want to create a formatter ... well that wouldn't work unpainfully either so I proposed a workaround for that too:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions