You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rule experimental:function-type-reference-spacing is complaining with Unexpected whitespace for anonymous functions: val annonymousFunction = fun(inString: String): String? = "Test string"
Observed Behavior
I believe that the anonymous function is properly written and should not complain about unexpected whitespace after the = operator. And removing the whitespace after the operator complains about Missing spacing after "="
Steps to Reproduce
Running Ktlin check that checks for experimental rules should reproduce this
Your Environment
Version of ktlint used: 0.45.1
Relevant parts of the .editorconfig settings n/a
Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): n/a
Version of Gradle used (if applicable): n/a
Operating System and version: n/a
The text was updated successfully, but these errors were encountered:
…tion
Rule should not depend on the existence of the function identifier
as it is also possible to define anonymous functions. Checking of
anonymous and named function should be identical.
Closespinterest#1440
…tion (#1443)
* Fix false positive FunctionTypeReferenceSpacingRule in anonymous function
Rule should not depend on the existence of the function identifier
as it is also possible to define anonymous functions. Checking of
anonymous and named function should be identical.
Closes#1440
Expected Behavior
The rule experimental:function-type-reference-spacing is complaining with Unexpected whitespace for anonymous functions:
val annonymousFunction = fun(inString: String): String? = "Test string"
Observed Behavior
I believe that the anonymous function is properly written and should not complain about unexpected whitespace after the
=
operator. And removing the whitespace after the operator complains about Missing spacing after "="Steps to Reproduce
Running Ktlin check that checks for experimental rules should reproduce this
Your Environment
.editorconfig
settings n/aThe text was updated successfully, but these errors were encountered: