The THEN branch of an IF does nothing and only its ELSE branch acts

tx0/sql:empty-then-branchstrictwarningstyle/conventionsdepth faststyle

What it finds

IF c THEN NULL; ELSE ... END IF: the condition only matters negated, which IF NOT c says directly.

From the rule's source, empty_then_branch.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/sql:empty-then-branch" = "warning"

To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.

tx0 explain tx0/sql:empty-then-branch shows the same in the terminal. Found a false positive? Report it.