A NOT IN list holds NULL, so the test is never true
What it finds
x NOT IN (1, NULL) is never true. NOT IN means "different from every element", and whether x differs from NULL is unknown, so the whole test is unknown or false, and a query filtered by it returns no rows.
From the rule's source, not_in_null_literal.rs.
Turn it on, off or suppress it
The rule runs in every tier. To turn it off for a project, set its level in tx0.toml:
[rules]
"tx0/sql:not-in-null-literal" = "off"To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.
tx0 explain tx0/sql:not-in-null-literal shows the same in the terminal. Found a false positive? Report it.