Ruben Quadros
11/27/2023, 12:40 PMfun Something.doSomething() {
assertThat(abc).isFalse
}
In my rule I check that if the function is doSomething()
then allow using assertThat(abc).isFalse
Every other place I throw an error and ask them to reuse Something.doSomething()
How do I only skip this function inspection?
I was thinking of using stopTraversalOfAST()
but this will stop inspection for the whole file.
For example, lets consider a file:
File Abc.kt
function Something.doSomething() {
assertThat(abc).isFalse
}
function Something.doSomethingElse() {
assertThat(abc).isFalse
//some more code
}
Here, I want my rule to complain and throw an error in doSomethingElse()