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
I believe this is the same/similar to 1245, but I was asked to make a new issue so here it is.
Expected Behavior
Be able to use tabs and break out function calls, function declarations, and class declarations into new lines.
Observed Behavior
When using tabs, I get 'Unexpected indentation' errors wherever I break out function parameters or class fields out into new lines. ktlint always expect 3 more indents than it should (e.g. "Unexpected indentation (expected 4, actual 1)").
If I explicitly set indent_size=1, ktlint seems to expect the correct indentation level, but still reports an error (e.g. "Unexpected indentation (expected 1, actual 1)").
Steps to Reproduce
Minimal class example:
class SomeClass(
private val field1: String,
private val field2: String
)
.editorconfig:
[*.{kt,kts}]
indent_style=tab
ktlint output:
SomeClass.kt:2:2: Unexpected indentation (expected 4, actual 1)
SomeClass.kt:3:2: Unexpected indentation (expected 4, actual 1)
Your Environment
Version of ktlint used: 0.43.2
Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): command line
Operating System and version: MacOS 11.6
The text was updated successfully, but these errors were encountered:
I believe this is the same/similar to 1245, but I was asked to make a new issue so here it is.
Expected Behavior
Be able to use tabs and break out function calls, function declarations, and class declarations into new lines.
Observed Behavior
When using tabs, I get 'Unexpected indentation' errors wherever I break out function parameters or class fields out into new lines. ktlint always expect 3 more indents than it should (e.g. "Unexpected indentation (expected 4, actual 1)").
If I explicitly set
indent_size=1
, ktlint seems to expect the correct indentation level, but still reports an error (e.g. "Unexpected indentation (expected 1, actual 1)").Steps to Reproduce
Minimal class example:
.editorconfig:
ktlint output:
Your Environment
The text was updated successfully, but these errors were encountered: