-
public final class LineLength extends DiktatRule
The rule checks for lines in the file that exceed the maximum length. Rule ignores URL in KDoc. Rule also can fix some cases. Rule can fix long binary expressions in condition inside
if
and in property declarations and one line functions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
LineLength.LineLengthConfiguration
RuleConfiguration for maximum line length
public class
LineLength.LongLineFixableCases
public class
LineLength.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
-
Constructor Summary
Constructors Constructor Description LineLength(List<RulesConfig> configRules)
-
Method Summary
Modifier and Type Method Description final Boolean
getIsFixMode()
Default value is false final Unit
setIsFixMode(Boolean isFixMode)
Default value is false final Function3<Integer, String, Boolean, Unit>
getEmitWarn()
Will be initialized in visit final Unit
setEmitWarn(Function3<Integer, String, Boolean, Unit> emitWarn)
Will be initialized in visit final List<RulesConfig>
getConfigRules()
final List<Rule>
getInspections()
final String
getId()
Unit
logic(ASTNode node)
Logic of the rule -
-
Constructor Detail
-
LineLength
LineLength(List<RulesConfig> configRules)
-
-
Method Detail
-
getIsFixMode
final Boolean getIsFixMode()
Default value is false
-
setIsFixMode
final Unit setIsFixMode(Boolean isFixMode)
Default value is false
-
getEmitWarn
final Function3<Integer, String, Boolean, Unit> getEmitWarn()
Will be initialized in visit
-
setEmitWarn
final Unit setEmitWarn(Function3<Integer, String, Boolean, Unit> emitWarn)
Will be initialized in visit
-
getConfigRules
final List<RulesConfig> getConfigRules()
-
getInspections
final List<Rule> getInspections()
-
-
-
-