.github/commands/checkstyle.json
{
"defaultSeverity": "INFO",
"checks": [
{
"type": "UnusedImport"
},
{
"type": "EmptyLines",
"props": {
"requireEmptyLineAfterInterface": false,
"requireEmptyLineAfterAbstract": false,
"requireEmptyLineAfterClass": false,
"allowEmptyLineAfterMultiLineComment": true
}
},
{
"type": "FileLength",
"props": {
"severity": "WARNING",
"max": 2000
}
},
{
"type": "EmptyBlock",
"props": {
"tokens": [
"ENUM_DEF",
"ABSTRACT_DEF",
"TYPEDEF_DEF",
"OBJECT_DECL",
"FOR",
"WHILE",
"SWITCH",
"TRY",
"CATCH"
],
"option": "empty",
"severity": "INFO"
}
},
{
"type": "NeedBraces",
"props": {
"allowSingleLineStatement": true,
"tokens": [
"FOR",
"IF",
"ELSE_IF",
"WHILE",
"DO_WHILE"
],
"severity": "INFO"
}
},
{
"type": "LeftCurly",
"props": {
"severity": "WARNING",
"option": "eol",
"ignoreEmptySingleline": "true",
"tokens": [
"CLASS_DEF",
"ENUM_DEF",
"ABSTRACT_DEF",
"TYPEDEF_DEF",
"INTERFACE_DEF",
"FUNCTION",
"FOR",
"IF",
"WHILE",
"SWITCH",
"TRY",
"CATCH",
"ARRAY_COMPREHENSION"
]
}
},
{
"type": "MultipleVariableDeclarations",
"props": {
"severity": "WARNING"
}
},
{
"type": "NullableParameter",
"props": {
"option": "nullDefault",
"severity": "ERROR"
}
},
{
"type": "SimplifyBooleanExpression",
"props": {
"severity": "IGNORE"
}
},
{
"type": "SimplifyBooleanReturn",
"props": {
"severity": "ERROR"
}
},
{
"type": "Trace",
"props": {
"severity": "IGNORE"
}
},
{
"type": "UnusedLocalVar"
},
{
"type": "UnnecessaryConstructor",
"props": {
"severity": "ERROR"
}
},
{
"type": "AvoidStarImport",
"props": {
"severity": "INFO"
}
},
{
"type": "ArrayLiteral",
"props": {
"severity": "ERROR"
}
},
{
"type": "StringLiteral",
"props": {
"policy": "doubleAndInterpolation",
"allowException": true,
"severity": "IGNORE"
}
},
{
"type": "RedundantAccessMeta",
"props": {
"prohibitMeta": false,
"severity": "INFO"
}
},
{
"type": "RedundantAllowMeta",
"props": {
"prohibitMeta": false,
"severity": "INFO"
}
},
{
"type": "PublicAccessor",
"props": {
"severity": "INFO"
}
},
{
"type": "CatchParameterName",
"props": {
"format": "^(e|t|ex)$",
"severity": "WARNING"
}
},
{
"type": "LocalVariableName",
"props": {
"severity": "IGNORE",
"format": "^[a-z][a-zA-Z0-9]*$"
}
},
{
"type": "MemberName",
"props": {
"severity": "IGNORE",
"format": "^[a-z][a-zA-Z0-9]*$",
"tokens": [
"PUBLIC",
"PRIVATE",
"CLASS"
]
}
},
{
"type": "MethodName",
"props": {
"severity": "IGNORE",
"format": "^[a-z][a-zA-Z0-9]*$",
"tokens": [
"PUBLIC",
"PRIVATE"
]
}
},
{
"type": "ParameterName",
"props": {
"severity": "ERROR",
"format": "^[a-z][a-zA-Z0-9]*$"
}
},
{
"type": "TypeName",
"props": {
"severity": "ERROR",
"format": "^[A-Z]+[a-zA-Z0-9]*$",
"tokens": [
"CLASS",
"ENUM",
"TYPEDEF"
]
}
},
{
"type": "TypeName",
"props": {
"severity": "ERROR",
"format": "^I[A-Z]+[a-zA-Z0-9]*$",
"tokens": [
"INTERFACE"
]
}
},
{
"type": "Anonymous",
"props": {
"severity": "ERROR"
}
},
{
"type": "AvoidIdentifier",
"props": {
"severity": "INFO",
"avoidIdentifiers": []
}
},
{
"type": "Return",
"props": {
"severity": "INFO",
"allowEmptyReturn": true,
"enforceReturnType": false,
"enforceReturnTypeForAnonymous": false
}
},
{
"type": "Type",
"props": {
"severity": "INFO",
"ignoreEnumAbstractValues": true
}
},
{
"type": "ArrayAccess",
"props": {
"spaceBefore": false,
"spaceInside": false,
"severity": "INFO"
}
},
{
"type": "Indentation",
"props": {
"severity": "INFO",
"character": " ",
"ignoreConditionals": false,
"ignoreComments": true,
"conditionalPolicy": "aligned",
"wrapPolicy": "larger"
}
},
{
"type": "IndentationCharacter",
"props": {
"severity": "INFO",
"character": "space"
}
},
{
"type": "OperatorWhitespace",
"props": {
"severity": "IGNORE",
"assignOpPolicy": "around",
"unaryOpPolicy": "none",
"ternaryOpPolicy": "none",
"arithmeticOpPolicy": "around",
"compareOpPolicy": "around",
"bitwiseOpPolicy": "around",
"boolOpPolicy": "around",
"intervalOpPolicy": "none",
"arrowPolicy": "none"
}
},
{
"type": "OperatorWrap",
"props": {
"severity": "IGNORE",
"option": "nl",
"tokens": [
"=", "+", "-", "*", "/", "%", ">", "<",
">=", "<=", "==", "!=", "&", "|", "^",
"&&", "||", "<<", ">>", ">>>", "+=",
"-=", "*=", "/=", "%=", "<<=", ">>=",
">>>=", "|=", "&=", "^=", "...", "=>",
"!", "++", "--"
]
}
},
{
"type": "SeparatorWhitespace",
"props": {
"severity": "IGNORE",
"dotPolicy": "around",
"commaPolicy": "none",
"semicolonPolicy": "none"
}
},
{
"type": "Spacing",
"props": {
"severity": "INFO",
"spaceIfCondition": "should",
"spaceForLoop": "should",
"spaceWhileLoop": "should",
"spaceSwitchCase": "should",
"spaceCatch": "should",
"spaceAroundBinop": true,
"noSpaceAroundUnop": true,
"ignoreRangeOperator": true
}
},
{
"type": "TabForAligning",
"props": {
"severity": "INFO"
}
},
{
"type": "TrailingWhitespace",
"props": {
"severity": "INFO"
}
},
{
"type": "WhitespaceAfter",
"props": {
"severity": "WARNING",
"tokens": [ ",", ";" ]
}
},
{
"type": "WhitespaceAround",
"props": {
"severity": "WARNING",
"tokens": [ "=", "+" ]
}
}
]
}