Package org.cqfn.diktat.ruleset.rules.chapter3
See: Description
-
Class Summary Class Description AnnotationNewLineRule This rule makes each annotation applied to a class, method or constructor is on its own line. BlockStructureBracesConfiguration Configuration for style of braces in block BlockStructureBraces This rule checks that non-empty code blocks with braces follow the K&R style (1TBS or OTBS style): The opening brace is on the same same line with the first line of the code block
The closing brace is on it's new line
The closing brace can be followed by a new line. Only exceptions are:
else
,finally
,while
(from do-while statement) orcatch
keywords. These keywords should not be split from the closing brace by a newline. Exceptions:opening brace of lambda
braces around
else
/catch
/finally
/while
(indo-while
loop)
BracesInConditionalsAndLoopsRule Rule that checks that all conditionals and loops have braces. ClassLikeStructuresOrderRule Rule that checks order of declarations inside classes, interfaces and objects. CollapseIfStatementsConfiguration RuleConfiguration for configuration CollapseIfStatementsRule Rule for redundant nested if-statements, which could be collapsed into a single one TooManySpacesRuleConfiguration RuleConfiguration for consecutive spaces ConsecutiveSpacesRule This visitor covers recommendation 3.8 of Huawei code style. EmptyBlockStyleConfiguration RuleConfiguration for empty blocks formatting EmptyBlock Rule that checks if empty code blocks ( { }
) are used and checks their formatting.EnumsSeparated Rule that checks enum classes formatting LineLengthConfiguration RuleConfiguration for maximum line length Comment Condition Fun Property PropertyWithTemplateEntry LongLineFixableCases LineLength The rule checks for lines in the file that exceed the maximum length. LongNumericalValuesConfiguration RuleConfiguration for numerical literals separation LongNumericalValuesSeparatedRule Rule that checks if numerical separators ( _
) are used for long numerical literalsMagicNumberConfiguration RuleConfiguration for configuration MagicNumberRule Rule for magic number MultipleModifiersSequence NullableTypeRule Rule that checks if nullable types are used and suggest to substitute them with non-nullable SingleLineStatementsRule Rule that looks for multiple statements on a single line separated with a ;
and splits them in multiple lines.SortRuleConfiguration RuleConfiguration for rule that sorts class members SortRule Rule that sorts class properties and enum members alphabetically StringConcatenationRule This rule covers checks and fixes related to string concatenation. StringTemplateFormatRule In String templates there should not be redundant curly braces. TrailingCommaConfiguration Configuration for trailing comma TrailingCommaRule 1 Enumerations (In another rule) 2 Value arguments 3 Class properties and parameters 4 Function value parameters 5 Parameters with optional type (including setters) 6 Indexing suffix 7 Lambda parameters 8 when entry 9 Collection literals (in annotations)Type arguments 10 Type arguments 11 Type parameters 12 Destructuring declarations WhenMustHaveElseRule Rule 3. -
Object Summary Object Description Companion Companion Companion Companion Companion None Companion val text = "first part" + "second part" + "third part" STRING_PART_OFFSET equal to the left offset of first string part("first part") = white space + close quote (open quote removed by trim) + white space + plus sign Companion Companion Companion Companion Companion Companion