New issue
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
Trailing comma defaults changed in 0.48 #1810
Comments
This change is documented in the release notes. Also see PR #1669
|
@paul-dingemans Thank you for the context! Should there be a follow-up update of the documentation on https://pinterest.github.io/ktlint/rules/configuration-ktlint? |
Yes good remark. To be fixed by #1814 |
Expected Behavior
With the default ruleset ktlint shouldn't add trailing commas on the call and declaration sites.
It's the behavior with 0.47
It's the specified behavior in the doc:
https://pinterest.github.io/ktlint/rules/configuration-ktlint/#trailing-comma-on-declaration-site
https://pinterest.github.io/ktlint/rules/configuration-ktlint/#trailing-comma-on-call-site
Observed Behavior
After upgrading from 0.47.x to 0.48.{0,1,2}, applying ktint reformatted code to add trailing to declaration sites.
To preserve an old behavior I had to add
to '.editorconfig' while it shouldn't be necessary, these values are stated as defaults.
Your Environment
Version of ktlint used: 0.47.1, 0.48.{0,1,2}
Relevant parts of the
.editorconfig
settingsName and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): diffplug/spotless:6.14.1
Version of Gradle used (if applicable): 7.6
The text was updated successfully, but these errors were encountered: