Thursday, February 6, 2014

Check style - What is the meaning of inherit severity ?

Inherit severity indicates that, whatever is the parent severity will be applicable for a child element.

The default parent of every module is a 'checker', and default severity is 'warning'.

Look at the Checkstyle configuration file below.

<module name="Checker"> //Default Parent
  <property name="severity" value="warning"/>  //Default property of checker

  <module name="TreeWalker">
    <module name="JavadocMethod">
      <property name="severity" value="warning"/>
      <property name="suppressLoadErrors" value="true"/>
      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="error"/>
    </module>
    <module name="JavadocType"/>
    <module name="JavadocVariable"/>
    <module name="JavadocStyle">
      <property name="checkFirstSentence" value="false"/>
 .....

</module>


Resource:
http://checkstyle.sourceforge.net/config.html#Properties




No comments:

Post a Comment