8000 refactor: solang by mds1 · Pull Request #8 · ScopeLift/scopelint · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: solang #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 15, 2022
Merged

refactor: solang #8

merged 7 commits into from
Nov 15, 2022

Conversation

mds1
Copy link
Contributor
@mds1 mds1 commented Nov 11, 2022

Replace hacky regex checks with solang, which is a solidity parser. One downside is that we currently lose line number info, but we can get it back in a future update. solang provides location data as start and end offsets in bytes, so we have to manually convert that to line number by mapping it to the input string.

Edit: foundry has the function we need to do that implemented here, so we can use that to report line numbers, h/t/ @rkrasiuk

Copy link
@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some smol comments/suggestions

Copy link
Contributor
@jferas jferas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.. and losing the line number for now doesn't seem like a major issue as the offending string is output

@mds1 mds1 merged commit 8c44058 into main Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0