Can someone share an example on how to ignore the ...
# detekt
p
Can someone share an example on how to ignore the TooGenericExceptionCaught rule in an anonymous object implementation. The anonymous object is an instance of
ConnectivityManager.NetworkCallback
in Android
I got away using the Suppress annotation on the function that instantiates the anonymous object. Is this the appropriate way? I wanted to do it in
detekt-baseline.xml
but did not have success.
b
You could add the annotation to the try. And there is a gradle task that generates the baseline.
p
Thanks Brais, that worked. It seems to refer to anonymous objects as
<no name provided>
188 Views