Closed flaviut closed 4 months ago
Workaround:
val authorizor = AuthorizationManager<MessageAuthorizationContext<*>> { _, obj ->
AuthorizationDecision(false)
}
val authorizor = AuthorizationManager( fun( _: Supplier
, obj: MessageAuthorizationContext<*>, ): AuthorizationDecision = AuthorizationDecision(false), )
I have never seen this construct with an anonymous function being passed in this way. The blank-line-before-declaration
should not treat this argument for the AuthorizationManager
as a declaration, and as of that not enforce a blank line above it.
Expected Behavior
Formatting this code:
should end up in some sort of stable state. It doesn't really matter to me what it looks like, as long as it's consistent.
Observed Behavior
fails with "Format was not able to resolve all violations which (theoretically) can be autocorrected in file …/TestFile.kt in 3 consecutive runs of format."
Steps to Reproduce
Your Environment
.editorconfig
settingsktlint --log-level=debug -F ./TestFile.kt
have the exact same output