Hi, can anyone point me to which `Rule` visitor me...
# detekt
j
Hi, can anyone point me to which
Rule
visitor method to override to determine if a type implements an interface? I looked at visitSuperTypeEntry but in poking it I didn't see what i was looking for. Usecase: if a type implements an interface, check the value set to a
val
property.
b
I imagine that you need to start looking at
visitClass
(or something like that) And check if it implements your interface. If it does you add it to a list. Then you check the properties and check if it does what you want and at the end of
visitFile
you can if it's correct.
Other option is to check all the properties, check if it is the property that you want and check that its class implements that interface.
j
Thanks for replying! I looked at visitClass. I am not sure how to resolve the super types ? Is there some sort of resolution i need to do on the provided input?