Hi đź‘‹ . I am trying to write to a custom rule to detect mutation in code. This involves checking for presence of Mutable collections, keywords like
var
in codebase. What is i could come up till now is
Copy code
override fun visitDeclaration(dcl: KtDeclaration) {
super.visitDeclaration(dcl)
if (dcl is KtProperty && dcl.isVar) {
report(CodeSmell(issue, Entity.from(dcl), "Mutation in code"))
}
}