onflow/cadence-tools

[Lint] Report unused results

Closed this issue · 0 comments

Feature Request

Add a new analyzer which detects unused value-typed results. For example, the following code is likely a bug:

let string = "hello"
string.concat("world")

Suggested Solution

  • Report ExpressionStatements of:
    • Function call with value-typed result
    • Literals (strings, boolean, array, dictionary, etc.)
    • Variable (no side-effect)