-
Notifications
You must be signed in to change notification settings - Fork 508
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
Ktlint-cli --code-style=intellij_idea
is not respected in ktlint 1.0.0
#2238
Comments
Property When you specify the code style in the
|
--code-style=intellij_idea
is not respected
--code-style=intellij_idea
is not respected--code-style=intellij_idea
is not respected in ktlint 1.0.0
I think that it's useful to be able to pass the code style on the command line. I've started to use Kotlin for scripting too. Adding an let b:ale_fixers = ['ktlint']
let b:ale_kotlin_ktlint_options = join([
\ '--log-level=none',
\ '--code-style=intellij_idea',
\ ]) |
I've built a self-executable ktlint that defaults to "intellij_idea". I'm fine with this solution. No need to keep |
Pass parameter correctly to KtlintRuleEngine. Also, deprecate parameters '--code-style', '--disabled-rules' and '--experimental' as those should be specified in the '.editorconfig' properties Closes #2238
Expected Behavior
In the following example, ktlint should not complain about "multiline-expression-wrapping" if the code style is set to "intellij_idea".
Observed Behavior
ktlint 1.0.0 outputs a "multiline-expression-wrapping" warning and inserts a newline and an extra indentation level if the code is formatted. Intellij IDEA doesn't do that and puts the lambda expression back on the first line if the code is formatted twice. ktlint 0.50.0 works as expected.
Steps to Reproduce
Run
ktlint --code-style=intellij_idea example.kts
on the first example.Your Environment
The text was updated successfully, but these errors were encountered: