If
condition depends on boolean
value that is a compile time constant SC-W1022The specified if
condition depends on a boolean
value that is a constant and changes neither at compile-time nor at runtime. This is likely due to a human error and is expected that this constant value is replaced with an appropriate condition that can be evaluated as necessary. Without this fix, it is expected that this if
condition can potentially alter the logic of your program, thus affecting the overall behavior of your program.
if (true) {
// do something
}
if (false) {
// do something
}
if (/* some condition */) {
// do something
}