-
Notifications
You must be signed in to change notification settings - Fork 750
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
Fix 'pragma solidity' parsing #1887
Conversation
remove comments and strings before searching for a line containing 'pragma solidity'
The patch tries to be minimally invasive; you may want to integrate it better. The comment citing the source can be removed (no need to give credits), it is just to inspire trust (?) that the code works since we used it for processing source codes in one of our studies. |
For some reason, I’ve lost access to the CircleCI pipeline results over the past month. @psantos-consensys, could you look into the cause of CircleCI’s failure? Additionally, could you change the permissions to view Mythril’s CircleCI results? Since Mythril is open-source, these results should ideally be public as they were previously. |
@norhh @psantos-consensys Any chance that something is going to happen in the near future? I'm fine with the pull request being rejected but this CircleCI pipeline issue occurring with every pull request now seems to be unhealthy. |
I don't know when it will be fixed/visible. I've asked someone to look into it. |
@norhh can you please double check if it is working as expected now? |
@gsalzer, the test failures seem to be due to the test case related to these files: version_2.sol, version_3.sol. |
@norhh Please check the updated code. Now, it first searches for a regular pragma that does not occur in a comment or string, and if this fails, falls back to how Mythril searches the pragma currently (i.e., searching within comments as well). |
What is the proper way to execute the tests in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR. Can you make these quick refactoring changes?
@norhh Refactoring done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
remove comments and strings before searching for a line containing 'pragma solidity'