Reports if expressions whose condition is constant and therefore the expression can be simplified.

While occasionally intended, this construction is confusing, and often the result of a typo.

Example:


  fun example() {
      if (true) {
          throw IllegalStateException("Unexpected state")
      }
  }

A quick-fix is suggested to remove the if condition:


  fun example() {
      throw IllegalStateException("Unexpected state")
  }