Menu

#344 Changes to suppression file not noticed unless checkstyle XML file modified

5.0.0
open
nobody
None
1
2014-09-23
2012-10-01
No

I'm using Eclipse Checkstyle Plugin 5.6.0.201209221626.

I noticed that when I made changes to my suppressions XML file, they were not noticed by the Checkstyle plugin when I ran the checks on my project. I had to edit my main checkstyle XML file in order to trigger the re-evaluation of the suppressions file.

Discussion

  • Lars Koedderitzsch

    Alternatively you can restart eclipse (joke) or just press the tiny reload button on the eclipse-cs section in Workspace preferences.

     
    • Christoph Pickl

      Christoph Pickl - 2014-03-24

      where is this "eclipse-cs section" and the "Workspace preferences"? sorry for asking dumb questions :)

       
      • Lars Koedderitzsch

        Just Preferences->Checkstyle

        It's probably just me being overly cryptic ;-)

         
  • Christoph Pickl

    Christoph Pickl - 2014-03-21

    reloading the suppression file content always has been a pain in the a** for me. now it's even worse as i want to configure eclipse-cs via maven by using the m2e-code-quality plugin, now reloading suppressions does not work at all! have to re-checkout to get rid of some cached (?!) configs :(

     
  • Lars Koedderitzsch

    Sorry for the late reply. I can not figure why a re-checkout would be necessary, since the plugins caching is only in memory at this point.

    If you're still experiencing this issue (and have not yet given up on using Checkstyle) can you please elaborate your project setup?

    Attaching the
    .project
    .checkstyle
    Checkstyle config file
    Suppression file

    would be helpful to analyze this.

    On a sidenote I found it exceedingly more practical to make use of the SuppressWarningsFilter, which can use the standard @SuppressWarnings annotations to suppress checkstyle messages (see http://checkstyle.sourceforge.net/config.html#SuppressWarningsFilter).
    In any case it might also be an issue of your configuration being overly strict when lots of legitimate suppressions are being needed.

     

Log in to post a comment.