From ac942e60870f09347e28d910c90563d30435d4b1 Mon Sep 17 00:00:00 2001 From: Arrgentum Date: Wed, 25 May 2022 16:17:56 +0300 Subject: [PATCH] ### Whats added: * corrected logic fix and warn String Template in Linelength rule * added logic fix and warn long Dot Qualified Expression and Safe Access Expression in LineLength rule * added logic fix and warn Value Arguments List in LineLength rule * added and corrected fix and warn tests in LineLength rule * fix code with diktat:fix@diktat * added comments to classes and functions * correct code with running detect ### Issue (#1243) --- .../kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt index 709996f574..faea4eda80 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt @@ -644,7 +644,7 @@ class LineLength(configRules: List) : DiktatRule( .sortedBy { it.second } .reversed() .firstOrNull { (it, offset) -> - offset + (it.getFirstChildWithType(type)?.text?.length ?:0)<= configuration.lineLength + 1 + offset + (it.getFirstChildWithType(type)?.text?.length ?: 0) <= configuration.lineLength + 1 } }