Kotlin
Boolean expression can be simplified
Info
Last modified: 03 December 2024Reports boolean expression parts that can be reduced to constants.
The quick-fix simplifies the condition.
Example:
fun use(arg: Boolean) {
if (false == arg) {
}
}
After the quick-fix is applied:
fun use(arg: Boolean) {
if (!arg) {
}
}
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
SimplifyBooleanWithConstants
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Kotlin, 243.23126-IJ |
Thanks for your feedback!
Was this page helpful?