A PL/SQL NOT NULL variable or constant is declared without an initial value

tx0/sql:not-null-variable-without-valuerecommendederrorreliability/null-safetydepth fastbug

What it finds

A PL/SQL variable declared NOT NULL or CONSTANT without an initial value is rejected by Oracle, since it would start as NULL.

From the rule's source, not_null_variable_without_value.rs.

Turn it on, off or suppress it

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

tx0.toml
[rules]
"tx0/sql:not-null-variable-without-value" = "error"

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

tx0 explain tx0/sql:not-null-variable-without-value shows the same in the terminal. Found a false positive? Report it.