W0022: feedback clause ignores prior state
Generated from rellum-diagnostics/src/db.rs.
Explanation
A feedback clause that does not read the prior state value cannot accumulate from the previous tick. If it also ignores the triggering event payload, it produces the same value every time the clause fires.
Common causes
- writing
on event => 1when intending to increment - forgetting to reference the state binding inside its feedback clause
Canonical fixes
- reference the prior state value when the clause should accumulate
Before:
on event => 1
After:
on event => count + 1
Code example
on event => 1