Skip to content

Commit

Permalink
### Whats added:
Browse files Browse the repository at this point in the history
 * 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)
  • Loading branch information
Arrgentum committed May 25, 2022
1 parent 8c3d6b8 commit ca89cbd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.cqfn.diktat.ruleset.rules.chapter3

import org.cqfn.diktat.common.config.rules.RulesConfig
import org.cqfn.diktat.common.config.rules.RuleConfiguration
import org.cqfn.diktat.common.config.rules.RulesConfig
import org.cqfn.diktat.common.config.rules.getRuleConfig
import org.cqfn.diktat.ruleset.constants.Warnings.LONG_LINE
import org.cqfn.diktat.ruleset.rules.DiktatRule
Expand Down Expand Up @@ -380,7 +380,7 @@ class LineLength(configRules: List<RulesConfig>) : DiktatRule(
val node = wrongDotQualifiedExpression.node
val dot = node.getFirstChildWithType(DOT)
val safeAccess = node.getFirstChildWithType(SAFE_ACCESS)
val splitNode = if ( (dot?.startOffset ?: 0) > (safeAccess?.startOffset ?: 0)) {
val splitNode = if ((dot?.startOffset ?: 0) > (safeAccess?.startOffset ?: 0)) {
dot
} else {
safeAccess
Expand Down

0 comments on commit ca89cbd

Please sign in to comment.