detekt / detekt

Static code analysis for Kotlin
https://detekt.dev
Apache License 2.0
6.05k stars 752 forks source link

Question for new rule to check if test method is missing `@Test` annotation #7207

Closed trietbui85 closed 1 week ago

trietbui85 commented 1 week ago

Expected Behavior of the rule

It would check the Test File for any test method that doesn't have @Test annotation.

Context

Sometimes devs forget to add the @Test annotation (yeah, really). So a Detekt rule would be helpful to avoid this situation.

BraisGabin commented 1 week ago

https://github.com/BraisGabin/detekt-junit-rules

That rule is implemented there. Detekt doesn't have rules related with frameworks. For that resin this is implemented in a third party plugin.

trietbui85 commented 1 week ago

Thanks a lot. I even know there is such Detekt plugin.