Why is this an issue?

When the return value of a function call contains the operation status code, this value should be tested to make sure the operation completed successfully.

This rule raises an issue when the return values of the following are ignored:

Noncompliant code example

fun doSomething(file: File, lock: Lock) {
    file.delete() // Noncompliant
    // ...
    lock.tryLock() // Noncompliant
}

Compliant solution

fun doSomething(file: File, lock: Lock) {
    if (!file.delete()) {
        // file delete failed; take appropriate action
    }
    if (!lock.tryLock()) {
        // lock failed; take appropriate action
    }
}

Resources

Although these resources talk about Java, the underlying information concerning the JVM is just as relevant for Kotlin.