onflow / cadence-tools

Developer tools for Cadence
https://www.onflow.org/
Apache License 2.0
24 stars 20 forks source link

[lint] Add Cadence 1.0 Analyzer #287

Closed jribbink closed 6 months ago

jribbink commented 7 months ago

Issue to be solved

Given the changes coming to Cadence 1.0 & the necessity for developers to update their contracts, it would be very useful to developers to have access to robust diagnostic information related to outdated code. While some dedicated messaging exists for particular features, others have not been addressed and will only surface as a generic checker/parser error (i.e. "member getCapability doesn't exist"). It would help the user experience if there were diagnostic errors which guided them through the process and specifically addressed these removed features.

This can be surfaced in multiple places:

Suggested Solution

Add an analyzer which identifies pieces of code using the old >Cadence 1.0 syntaxes and gives diagnostic information with the following: