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
The following code is valid:
fun test() = try { 1 } catch(_: Throwable) { 2 }
and
typealias Foo = HashMap<Bar, Baz?>
ktlint formats the code like this:
Run ktlint --format
ktlint --format
.editorconfig:
[*.{kt,kts}] ij_kotlin_allow_trailing_comma = false ij_kotlin_allow_trailing_comma_on_call_site = false indent_size = 2 indent_style = space insert_final_newline = true ktlint_experimental = enabled ktlint_experimental_comment-wrapping = disabled ktlint_experimental_function-naming = disabled ktlint_experimental_function-signature = disabled ktlint_experimental_property-naming = disabled ktlint_standard_annotation = disabled ktlint_standard_filename = disabled ktlint_standard_keyword-spacing = disabled ktlint_standard_max-line-length = disabled ktlint_standard_no-semi = disabled ktlint_standard_package-name = disabled ktlint_standard_spacing-between-declarations-with-annotations = disabled ktlint_standard_string-template = disabled max_line_length = 120
The formatting is correct when ktlint 0.47.1 is used
The text was updated successfully, but these errors were encountered:
Fix indentation of a multiline typealias indentand try-catch-finall…
indent
e9d51f6
…y when catch or finally starts on a newline Closes #1788
Successfully merging a pull request may close this issue.
Expected Behavior
The following code is valid:
and
Observed Behavior
ktlint formats the code like this:
and
Steps to Reproduce
Run
ktlint --format
.editorconfig:
The formatting is correct when ktlint 0.47.1 is used
Your Environment
The text was updated successfully, but these errors were encountered: