When I run gradlew ktlintCheck
it fails with a lot of
Wildcard import (cannot be auto-corrected)
errors.
When I run gradlew ktlintCheck
it fails with a lot of
Wildcard import (cannot be auto-corrected)
errors.
Create a .editorconfig
file on root level and add amongst others:
disabled_rules=no-wildcard-imports
Came across this ktlint-gradle issue where it discussed about support to be added to ktlint-gradle for --disabled_rules. It eventually got included and a new cleaner way of disabling no-wildcard import check is as following.
ktlint {
enableExperimentalRules.set(true)
disabledRules.set(setOf("experimental:package-name", "no-wildcard-imports"))
}
FYI: Following rationale made --disabled_rules support possible.
© 2022 - 2024 — McMap. All rights reserved.