A function body has no RETURN statement
What it finds
A function whose body has no RETURN cannot return its value: SQL Server rejects it, and Oracle and MySQL fail at run time when the end of the body is reached. Functions returning tables, and PostgreSQL functions, which can return through output parameters, are left alone.
From the rule's source, function_without_return.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:
[rules]
"tx0/sql:function-without-return" = "error"To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.
tx0 explain tx0/sql:function-without-return shows the same in the terminal. Found a false positive? Report it.