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
If ktlint makes a suggestion regarding whitespace between "," and ")" which the developer then applies, ktlint should accept the suggestion that it made
If it is disallowed to have a trailing “,” before “)”, could the check say that instead?
Observed Behavior
We have some code that looks like this:
// Ignore lint warnings in documentation snippets
@file:Suppress("unused", "UNUSED_PARAMETER", "UNUSED_VARIABLE",)
When we run ./gradlew ktlint, it says:
> Task :compose:integration-tests:docs-snippets:ktlint FAILED
frameworks/support/compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/interoperability/Interoperability.kt:19:64: Missing spacing after ","
When we add a space to make the code look like this:
Expected Behavior
If ktlint makes a suggestion regarding whitespace between "," and ")" which the developer then applies, ktlint should accept the suggestion that it made
If it is disallowed to have a trailing “,” before “)”, could the check say that instead?
Observed Behavior
We have some code that looks like this:
When we run
./gradlew ktlint
, it says:When we add a space to make the code look like this:
We get this error:
Steps to Reproduce
The source file: https://android.googlesource.com/platform/frameworks/support/+/e096810f5ad8e55dd5daf6477beaeef233549d55/compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/interoperability/Interoperability.kt
The repository: https://android.googlesource.com/platform/frameworks/support/+/e096810f5ad8e55dd5daf6477beaeef233549d55/README.md
Your Environment
Ktlint config: https://android.googlesource.com/platform/frameworks/support/+/e096810f5ad8e55dd5daf6477beaeef233549d55/buildSrc/src/main/kotlin/androidx/build/Ktlint.kt (except that I'm removing the disabling of paren-spacing and import-ordering as suggested in Block ktlint-disable directive not working #967 (comment) )
Workaround
It seems to work to simply delete the trailing ","
Thanks!
The text was updated successfully, but these errors were encountered: