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
Pablichjenkov
06/12/2023, 7:21 PM
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
Brais Gabin
06/12/2023, 8:53 PM
You could add the annotation to the try. And there is a gradle task that generates the baseline.
p
Pablichjenkov
06/12/2023, 9:40 PM
Thanks Brais, that worked. It seems to refer to anonymous objects as