We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given:
class DB { operator fun <T> get(query: DB.() -> T): T = TODO() } val db = DB() val query = db[{ 123 }]
so, an operator get function with a lambda argument inside, KtLint should be happy with this notation. It is accepted by IntelliJ.
We get a linting error: Lint error > [standard:curly-spacing] Missing spacing before "{".
Lint error > [standard:curly-spacing] Missing spacing before "{"
If I run the formatter instead it performs a fix and reverts it again: Format fixed > [standard:curly-spacing] Missing spacing before "{"
Format fixed > [standard:curly-spacing] Missing spacing before "{"
Format fixed > [standard:square-brackets-spacing] Unexpected spacing after '['
See the example above.
ktlint_code_style = intellij_idea
The text was updated successfully, but these errors were encountered:
Fixed [{ }] notation for issue pinterest#2675 in standard:curly-spaci…
10a5404
…ng rule. Added tests.
Fix test names, remove call argument names for non-booleans
43e611d
Closes pinterest#2675
58a5365
Successfully merging a pull request may close this issue.
Expected Behavior
Given:
so, an operator get function with a lambda argument inside, KtLint should be happy with this notation. It is accepted by IntelliJ.
Observed Behavior
We get a linting error:
Lint error > [standard:curly-spacing] Missing spacing before "{"
.If I run the formatter instead it performs a fix and reverts it again:
Format fixed > [standard:curly-spacing] Missing spacing before "{"
Format fixed > [standard:square-brackets-spacing] Unexpected spacing after '['
Steps to Reproduce
See the example above.
Your Environment
ktlint_code_style = intellij_idea
The text was updated successfully, but these errors were encountered: