Cadence Linter
The Cadence Linter is a static-analysis tool for finding potential issues in Cadence code. It is available in the Flow CLI & is designed to help developers write better code by identifying common mistakes and potential issues before they become problems.
The linter will also check your code for any syntax or semantic errors, and provide suggestions for how to fix them.
_10flow cadence lint [files]
Example Usage
_10flow cadence lint **/*.cdc
Example Output
_10test.cdc:27:6: semantic-error: cannot find variable in this scope: `abc`_10_10test.cdc:35:6: removal-hint: unnecessary force operator_10_102 problems (1 error, 1 warning)
info
The Cadence Linter is also available in the Cadence VSCode extension, which provides real-time feedback as you write your code.