仓库指标
- 星标
- (6,942 个星标)
- PR 合并指标
- (PR 指标待抓取)
描述
Kotlin has an Opt-in mechanism to make sure that the users know that they are using a not stable API. They used on their Standard library and it's used by third parties too (even detekt uses it):
This is a great mechanism but when an API go from unstable to stable a lot of @OptIn annotations are left back on the code. Also this happen when later you refactor the code and remove the usage of that unstable api.
My proposal is to implement a rule to check for this cases so we don't have any unused @OptIn annotation in the code.
I see warnings on IntelliJ so maybe we could port it.
It would be great to also raise usages of propagating opt-in but I'm not sure if we could find those cases.