A function declared static is defined later without static, which keeps it internal but reads as external

tx0/c:static-declared-defined-withoutstrictwarningmaintainability/designdepth fastsmell

What it finds

static int helper(void); and later int helper(void) { ... }: the definition inherits internal linkage from the declaration, but a reader of the definition alone takes the function for one other files can call.

From the rule's source, static_declared_defined_without.rs.

Example from the rule's tests
static int helper(int x); int helper(int x)tx0 reports: helper is declared static but defined without it{  return x + 1;}
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

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/c:static-declared-defined-without" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/c:static-declared-defined-without] reason="..."

tx0 explain tx0/c:static-declared-defined-without shows the same in the terminal. Found a false positive? Report it.