Menu

#413 WriteTag warnings do not work when severity is ignore

8.5.0
wont-fix
nobody
None
1
2017-12-20
2016-11-10
No

The WriteTag check does not show warnings on tags in eclipse-cs when the severity is set to ignore. This is different behavior compared to the checkstyle CLI:

$ cat Test.java
/**

  • @author cpai
    */
    public class Test {
    }

$ cat config.xml

<module name="Checker">
<property name="charset" value="UTF-8">
<property name="severity" value="warning">
<module name="TreeWalker">
<module name="WriteTag">
<property name="severity" value="ignore">
<property name="tag" value="@author">
<property name="tagFormat" value="\S">
<property name="tagSeverity" value="warning">
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="warning">
</metadata></property></property></property></property></module>
</module>
</property></property></module>

$ java -jar checkstyle-7.2-all.jar -c config.xml Test.java
Starting audit...
[WARN] C:\cygwin64\home\cpai\work\test\Test.java:3: @author=cpai [WriteTag]
Audit done.

Discussion

  • Cheng-Yu Pai

    Cheng-Yu Pai - 2016-11-10

    Oops, the Test.java actually looked like:

    /**
    
     * @author cpai
     */
    public class Test {
    
    }
    

    Not sure how the asterisk disappeared

     
  • Lars Koedderitzsch

    eclipse-cs uses a checkstyle option to directly exclude ignored modules during configuration loading (https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java#L178).

    This is done to optimize Checkstyle execution within the IDE so that modules are not executed at all if their results would be ignored anyway.

    I suppose the WriteTag check was not implemented with that in mind. You should take this up with the Checkstyle core team.

     
  • Lars Koedderitzsch

    • status: open --> wont-fix
    • Group: Future --> 8.5.0
     
  • Lars Koedderitzsch

    Closing for housekeeping, please take it up with Checkstyle core, if this is still an issue for you.

     

Log in to post a comment.

MongoDB Logo MongoDB