Skip to content

Commit

Permalink
Loosen dependency between chain-method-continuation and argument-list…
Browse files Browse the repository at this point in the history
…-wrapping

Allow the chain-method-continuation rule to be run when argument-list-wrapping is disabled or not loaded. Whenever both rules are loaded, the argument-list-wrapping takes precedence and runs before the chain-method-continuation.

Closes #2452
  • Loading branch information
paul-dingemans committed Dec 27, 2023
1 parent 0934f37 commit 6b6485b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public class ChainMethodContinuationRule :
chainOperator.shouldBeOnSameLineAsClosingElementOfPreviousExpressionInMethodChain() -> {
removeWhiteSpaceBeforeChainOperator(chainOperator, emit, autoCorrect)
}

wrapBeforeEachChainOperator || exceedsMaxLineLength || chainOperator.isPrecededByComment() -> {
insertWhiteSpaceBeforeChainOperator(chainOperator, emit, autoCorrect)
}
Expand Down

0 comments on commit 6b6485b

Please sign in to comment.