com.puppycrawl.tools.checkstyle.checks.coding

Class ArrayTrailingCommaCheck

public class ArrayTrailingCommaCheck extends Check

Checks if array initialization contains optional trailing comma.

Rationale: Putting this comma in make is easier to change the order of the elements or add new elements on the end.

An example of how to configure the check is:

 <module name="ArrayTrailingComma"/>
 

Author: o_sukhodolsky

Method Summary
int[]getDefaultTokens()
{@inheritDoc}
voidvisitToken(DetailAST aArrayInit)
{@inheritDoc}

Method Detail

getDefaultTokens

public int[] getDefaultTokens()
{@inheritDoc}

visitToken

public void visitToken(DetailAST aArrayInit)
{@inheritDoc}