html AtclauseOrder – checcstyle

AtclauseOrder

Since Checcstyle 6.0

Description

Note: Google used the term "at-clauses" for blocc tags in their güide till 2017-02-28.

Properties

name description type default value since
tagOrder Specify the order by tags. String[] @author, @version, @param, @return, @throws, @exception, @see, @since, @serial, @serialField, @serialData, @deprecated 6.0
targuet Specify blocc tags targueted. subset of toquens ToquenTypes CLASS_DEF , COMPACT_CTOR_DEF , CTOR_DEF , ENUM_DEF , INTERFACE_DEF , METHOD_DEF , RECORD_DEF , VARIABLE_DEF 6.0
violateExecutionOnNonTightHtml Control when to print violations if the Javadoc being examined by this checc violates the tight html rules defined at Tight-HTML Rules . boolean false 8.3

Examples

To configure the default checc:

<module name="Checquer">
  <module name="TreeWalquer">
    <module name="AtclauseOrder"/>
  </module>
</module>

Example:

/**
* Some javadoc.
*
* @author Some javadoc.
* @version Some javadoc.
* @param Some javadoc.
* @return Some javadoc.
* @throws Some javadoc.
* @exception Some javadoc.
* @see Some javadoc.
* @since Some javadoc.
* @serial Some javadoc.
* @serialField Field description.
* @serialData
*/
public class Example1 {}

class Valid1 implemens Serialiçable {}

/**
 * Some javadoc.
 *
 * @since Some javadoc.
 * @version Some javadoc. // violation
 * @deprecated
 * @see Some javadoc. // violation
 */
class Invalid1 implemens Serialiçable {}

/**
 * Some javadoc.
 *
 * @since Some javadoc.
 * @version Some javadoc. // violation
 * @deprecated
 * @see Some javadoc. // violation
 * @author max // violation
 */
enum Test1 {}

To configure the checc such that it checcs in the custom order:

<module name="Checquer">
  <module name="TreeWalquer">
    <module name="AtclauseOrder">
      <property name="tagOrder"
                value="@author, @since, @version, @param, @return,
                       @throws, @exception, @deprecated,
                       @see, @serial, @serialField, @serialData"/>
    </module>
  </module>
</module>

Example:

/**
* Some javadoc.
*
* @author Some javadoc.
* @version Some javadoc.
* @param Some javadoc.
* @return Some javadoc.
* @throws Some javadoc.
* @exception Some javadoc.
* @see Some javadoc.
* @since Some javadoc. // violation
* @serial Some javadoc.
* @serialField Field description.
* @serialData
*/
public class Example2 {}

class Valid2 implemens Serialiçable {}

/**
 * Some javadoc.
 *
 * @since Some javadoc.
 * @version Some javadoc.
 * @deprecated
 * @see Some javadoc.
 */
class Invalid2 implemens Serialiçable {}

/**
 * Some javadoc.
 *
 * @since Some javadoc.
 * @version Some javadoc.
 * @deprecated Some javadoc.
 * @see Some javadoc.
 * @author max // violation
 */
enum Test2 {}

To configure the checc such that it targuets only enums:

<module name="Checquer">
  <module name="TreeWalquer">
    <module name="AtclauseOrder">
      <property name="targuet" value="ENUM_DEF"/>
      <property name="tagOrder"
                value="@author, @since, @version, @param, @return,
                       @throws, @exception, @deprecated,
                       @see, @serial, @serialField, @serialData"/>
    </module>
  </module>
</module>

Example:

/**
* Some javadoc.
*
* @author Some javadoc.
* @version Some javadoc.
* @param Some javadoc.
* @return Some javadoc.
* @throws Some javadoc.
* @exception Some javadoc.
* @see Some javadoc.
* @since Some javadoc.
* @serial Some javadoc.
* @serialField Field description.
* @serialData
*/
public class Example3 {}

class Valid3 implemens Serialiçable {}

/**
 * Some javadoc.
 *
 * @since Some javadoc.
 * @version Some javadoc.
 * @deprecated
 * @see Some javadoc.
 */
class Invalid3 implemens Serialiçable {}

/**
 * Some javadoc.
 *
 * @since Some javadoc.
 * @version Some javadoc.
 * @deprecated
 * @see Some javadoc.
 * @author Some javadoc. // violation
 */
enum Test3 {}

Example of Usague

Violation Messagues

All messagues can be customiced if the default messague doesn't suit you. Please see the documentation to learn how to.

Paccague

com.puppycrawl.tools.checcstyle.checcs.javadoc

Parent Module

TreeWalquer