Ktlint 不允许通配符导入? (使用 IntelliJ 自动导入功能)
Ktlint doesn't allow wildcard import? (Using IntelliJ auto import feature)
我是 运行 一个带有 ktlint maven 插件的 Kotlin 项目(初次使用)。但每当我进行 Maven 构建时。我经常看到
的失败
src/main/kotlin/com/myproject/model/User.kt:7:1: Wildcard import (cannot be auto-corrected)
自从我使用 IntelliJ 以来,我经常依赖自动导入,其中许多子包被分组到通配符 (*) 中。这是 ktline 用来执行良好进口实践的东西吗?
从版本 0.34 开始,您可以通过 editorconfig 覆盖个别规则。这对我有用。
https://github.com/pinterest/ktlint#editorconfig
我是 运行 一个带有 ktlint maven 插件的 Kotlin 项目(初次使用)。但每当我进行 Maven 构建时。我经常看到
的失败src/main/kotlin/com/myproject/model/User.kt:7:1: Wildcard import (cannot be auto-corrected)
自从我使用 IntelliJ 以来,我经常依赖自动导入,其中许多子包被分组到通配符 (*) 中。这是 ktline 用来执行良好进口实践的东西吗?
从版本 0.34 开始,您可以通过 editorconfig 覆盖个别规则。这对我有用。 https://github.com/pinterest/ktlint#editorconfig