When finding solidity version, appears to look at any version number
eg:
// SPDX-License-Identifier: NONE
// File @openzeppelin/contracts/utils/introspection/[email protected]
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
...
It tries to use solc 4.4.1.
Was it already fixed? Because I want to fix if not
I don't think it was fixed.
I’d like to work on this issue because I’ve identified the root cause: the current SolidityVersion function scans the entire source code for any version-looking number, which makes it incorrectly pick up numbers in comments or file metadata (like OpenZeppelin v4.4.1) instead of the actual pragma solidity line.
I plan to fix it by updating SolidityVersion to parse only the pragma solidity statement, ignoring all comments and unrelated version numbers. This ensures the correct compiler version is detected every time. I’ll also update the test to verify that the function correctly ignores version numbers in comments and extracts the real pragma version.
I’m confident I’m the right person for this job because I’ve already reproduced the issue locally, tested the current behavior, and implemented a working approach to fix it. I understand the repository and Go module workflow, and I can deliver a clean, reliable solution that addresses the root cause.
Pull requests are welcome!