This message was deleted.
# detekt
s
This message was deleted.
g
To simplify your scenario a bit: do you just want to forbid the
@Sample
annotation? Are there scenarios where such annotation is allowed? If not, you can probably use the https://github.com/detekt/detekt/blob/master/detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/ForbiddenImport.kt rule.
r
@gammax Thanks for reply. I want to force to dev that do not use that annotation inside class keep outside of that.
g
I want to force to dev that do not use that annotation inside class keep outside of that.
I don’t understand sorry. You want to prevent the usage of such annotation. Is that correct?
r
I want to prevent inside the class but outside the class dev can use. i.e.
Copy code
class A{
// Here prevent 
}
//Here dev can use because its outside the class but in the same file
@Sample
fun testMethod4(){
  // implementation goes here 
}