ST01 — Redundant ELSE NULL in CASE
Group: Structure · Auto-fixable: yes
A CASE expression already yields NULL when no branch matches, so ELSE NULL
is redundant. Removed automatically.
Example
Section titled “Example”bad: CASE WHEN x THEN 1 ELSE NULL ENDgood: CASE WHEN x THEN 1 ENDConfigure
Section titled “Configure”Disable this rule in banshee.toml:
[lint]exclude = ["ST01"]Or silence one line with -- noqa: ST01. See Linting.