-
Notifications
You must be signed in to change notification settings - Fork 460
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
Gradle + ktlint: spotlessApply fails because spotlessKotlin fails #1943
Comments
On my end spotless skips everything and formats nothing. |
https://pinterest.github.io/ktlint/latest/rules/standard/#max-line-length |
May related to #1924. |
@Goooler Thanks, I think I found the issue now. I updated the all problematic parts of the code by hand and |
Yep, that's a known problem with ktlint! For that reason, I discourage its use in my workplace, no matter if Spotless is used or not. |
If you are submitting a bug, please include the following:
summary of problem
Applying formatting and/or linting fixes using
spotlessApply
fails because Gradle runs the linting step before, which fails if changes are necessary. Because of this, auto-formatting Kotlin files using Ktlint doesn't work.Gradle or Maven version
Gradle 8.4
spotless version
spotless-gradle 6.23.3
operating system and version
MacOS 14.1.1
copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
gradlew spotless[Apply/Check] --stacktrace
The text was updated successfully, but these errors were encountered: