Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unused import when import is duplicated (#1129)
* Fix unused import when import is duplicated ktlint detects unused imports, such as: ``` import lib import lib2 // <- ktlint unused import rule is violated fun main() { lib.function(); } ``` However, when an import is duplicated -- and the duplicate import line is thus an unused import -- ktlint emits no rule violation. E.g: ``` import lib import lib // unused, but no violation fun main() { lib.function(); ``` This commit fixes that, emitting a rule violation when two imports have the same import path. * Revert verification metadata * fix lint Co-authored-by: Yahor Berdnikau <[email protected]> Co-authored-by: Sha Sha Chu <[email protected]>
- Loading branch information