Updated from org.jlleitschuh.gradle:ktlint-gradle:...
# ktlint
c
Updated from org.jlleitschuh.gradlektlint gradle9.2.1 to 9.4.0 and now I'm getting hundreds of these kinds of errors
Copy code
filea.kt:266:21: Unexpected indentation (expected 16, actual 20)
fileb.kt:267:17: Unexpected indentation (expected 12, actual 16)
filec.kt:281:21: Unexpected indentation (expected 16, actual 20)
filed.kt:282:17: Unexpected indentation (expected 12, actual 16)
What's the easiest way to resolve all of these? I'm assuming it either Opt out or Auto format via
./gradlew ktlintFormat
or intellij? Note: I'm using editorConfig (Not sure if that changes things) I tried auto formatting view ktlint and via intellij to no avail. Am I missing something?
t
try to run
ktlintFormat
usually should be enough
• may fix this issues manually • or disable "indent" rule There are a lot of related issue, probably yours is one of this already reported: https://github.com/pinterest/ktlint/issues?q=is%3Aopen+is%3Aissue+label%3Aindentation-rule
c
Looks like I'm going to disable the rule via
indent_size = unset
as there seems to be too many papercuts using it for this at this point. I'll hopefully try again at some point in the future.