guys am having some trouble updating ktlint to 0.4...
# ktlint
p
guys am having some trouble updating ktlint to 0.48.2 because I need to update to the new way of disabled_rules but it's confusing.
Copy code
ktlint_disabled_rules: '' +
                            'no-wildcard-imports, ' +
how would this translated ?
e
Copy code
ktlint_standard_no-wildcard-imports = disabled
p
I tried that but think the sintax is wrong
Copy code
.editorConfigOverride([ //Rules from <https://pinterest.github.io/ktlint/rules/standard/>
                        ij_kotlin_allow_trailing_comma             : true,
                        ij_kotlin_allow_trailing_comma_on_call_site: true,
                        ij_kotlin_packages_to_use_import_on_demand : false,
                        ktlint_standard_no-wildcard-imports = disabled,
Screenshot 2023-03-13 at 12.57.27.png
I think is expecting a map
e
No idea what .editorConfigOverride does
p
where do you use this ktlint_standard_no-wildcard-imports = disabled?
e
in
.editorconfig
file
p
really ?
so I have to set all of this in the editorconfig
e
I have it there at least, under
[*.{kt,kts}]
p
thanks I will give it a try
Screenshot 2023-03-13 at 13.01.02.png
do you have a warning like that
e
yes, but safe to ignore
p
hm ok
how do you know to wich groupt they belong?
Copy code
ktlint_standart_max-line-length = disabled
i.e
it seems that if you try to disable
Copy code
ktlint_standart_max-line-length = disabled
and you use
Copy code
[*]
max_line_length = 170
they don't work well together 🙂
mistake it's misspelled 🙂
Copy code
ktlint_standard_max-line-length = disabled
thanks @Emil Kantis great help
p
The editorconfig override can also be used as follows:
Copy code
EditorConfigOverride.from(
    CODE_STYLE_PROPERTY to ktlintCommand.codeStyle,
    INSERT_FINAL_NEWLINE_PROPERTY to "true",
)
p
thanks @Paul Dingemans