ankidroid / ankidroid/Anki-Android

lint: Enable unused import checks

Đang mở
#21,208 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Blocked by dependency Keep Open
Ngôn ngữ chính
Kotlin
Star
11.8k
Fork
2.9k
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
171

Mô tả

These were disabled in ktlint 1.7 and is now opt-in. `ktlint` planned to remove these checks, but this decision has been reversed

> Ktlint analyses code on a file by file base. Meaning, that all linting/formatting decisions have to be made based on information in the file that is being processed. Information in other files is not taken into account at all. For a 100% reliable detection whether an import is used, or unused, a file needs to be analyzed within the scope of the project and its dependencies.
>
> The no-unused-imports rule is marked as deprecated starting from Ktlint 1.7.0, and will be removed in Ktlint 2.0.0. Until the rule is removed, it can be used by explicitly enabling the rule in the .editorconfig, by adding:

* https://redirect.github.com/pinterest/ktlint/issues/3038

----

I will use `detekt` for this: https://detekt.dev/

I have been planning to enable `detekt` for a while, and this is a sufficient reason to start. Detekt bugfixes should be added as TODOs

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.