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
This should be properly formatted:
sealed class T(val name: String) { sealed class C( name: String, val something: String, ) : T(name) { object Black : C( name = "black", something = "else", ) } }
It complains that lines 7-9 (starting from name="black") should be indented 4 more spaces:
/tmp/bug1.txt:7:1: Unexpected indentation (12) (should be 16) (standard:indent) /tmp/bug1.txt:8:1: Unexpected indentation (12) (should be 16) (standard:indent) /tmp/bug1.txt:9:1: Unexpected indentation (8) (should be 12) (standard:indent)
Copy first snippet into /tmp/bug.txt Run ktlint 1.0.0 on it:
ktlint /tmp/bug.txt
.editorconfig
The text was updated successfully, but these errors were encountered:
This is indeed a regression bug in 1.0 release.
Sorry, something went wrong.
The problem can be reproduced with a somewhat simpler example:
class Foo( foo: String, ) { object Bar : Baz( baz = "baz", bar = "bar", ) }
Fix indent of multiline object declaration inside class
0d24f4a
Closes #2257
Fix indent of multiline object declaration inside class (#2266)
b135fe8
paul-dingemans
Successfully merging a pull request may close this issue.
Expected Behavior
This should be properly formatted:
Observed Behavior
It complains that lines 7-9 (starting from name="black") should be indented 4 more spaces:
/tmp/bug1.txt:7:1: Unexpected indentation (12) (should be 16) (standard:indent)
/tmp/bug1.txt:8:1: Unexpected indentation (12) (should be 16) (standard:indent)
/tmp/bug1.txt:9:1: Unexpected indentation (8) (should be 12) (standard:indent)
Steps to Reproduce
Copy first snippet into /tmp/bug.txt
Run ktlint 1.0.0 on it:
Your Environment
.editorconfig
settingsThe text was updated successfully, but these errors were encountered: