Skip to content

Commit

Permalink
Closes #1865
Browse files Browse the repository at this point in the history
  • Loading branch information
diphtongue committed Dec 19, 2023
1 parent 8c367de commit e0e2751
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class ClassLikeStructuresOrderRule(configRules: List<RulesConfig>) : DiktatRule(
(previousProperty.psi as KtProperty).accessors.isNotEmpty()

val whiteSpaceBefore = previousProperty.nextSibling { it.elementType == WHITE_SPACE } ?: return
val isBlankLineRequired = !isCorrectEolComment && (hasCommentBefore || hasAnnotationsBefore || hasCustomAccessors)
val isBlankLineRequired = (!isCorrectEolComment && hasCommentBefore) || hasAnnotationsBefore || hasCustomAccessors
val numRequiredNewLines = 1 + (if (isBlankLineRequired) 1 else 0)
val actualNewLines = whiteSpaceBefore.text.count { it == '\n' }
// for some cases (now - if this or previous property has custom accessors), blank line is allowed before it
Expand Down

0 comments on commit e0e2751

Please sign in to comment.