How to resolve cairo lint issues (cairo-format) when vscode doesn't display anything #114
threepwave
started this conversation in
Show and tell
Replies: 1 comment
-
FWIW, every cairo-lang release comes with its own .vsix file. I'd recommend installing it. Unfortunately, one has to do so manually, there's not a published extension as far as I know. Using the There's now also a pre-commit hook for Cairo you could use, but it's not 100% perfect as the repo can/does lag behind the latest releases. Instead, if you have the latest cairo-lang installed locally, you can use this in the - repo: local
hooks:
- id: cairo-format
name: cairo-format
language: system
entry: cairo-format -i
files: \.cairo$ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was regularly running into cairo formatting issues (e.g. File "contracts/settling_game/L07_Crypts.cairo" is incorrectly formatted) with no explanation of what was wrong in vscode.
To fix this, I used the 'Edit files inplace' feature of cairo-format which automagically fixed formatting issues for me 💪
find contracts -type f -name '*.cairo' | xargs cairo-format -i
Beta Was this translation helpful? Give feedback.
All reactions