Add detection for runCatching

Using runCatching without proper handling of Throwable exceptions should be marked as code smell. Throwable is parent of Error class, which should not be handled by user code, catching them would result in hard to catch bugs, like JVM not being able to act on the exception, or cases where the application would exit with code 0, instead of any error codes.
Noncompliant code:

runCatching { 
  //user code, any exception from Error type will be swallowed
}.getOrNull()

Compliant code:

runCatching {
  // user code
}.onFailure {
  // Or any other approach that will not swallow Error types
  if(it is Error) throw it
}.getOrNull()

Further read Stack overflow post

Hello @Soshyant and welcome to the community!

Sorry for the late reply, this is a good rule idea. I will add it to our backlog, so we can implement it once we have some dedicated time.

Thanks,
Margarita