Closed juanpcapurro closed 1 year ago
update: I narrowed it down to the npx solhint test/solidity/Leverager.t.sol
file causing the crash
I cannot reproduce this :no_mouth:
exactly
repoyarn add solhint-community
npx solhint test/solidity/Leverager.t.sol
Am I missing something here?
sorry, I wasn't clear:
I created a PR on Exactly where this issue can be reproduced: https://github.com/exactly/protocol/pull/628 , so you should
basedhint
,yarn
to install dependencies, npx solhint test/solidity/Leverager.t.sol
to cause the exception
it can only be replicated when using solhint-community (first commit of my pr) and with the unused imports removed (second commit)
That file has a syntax error. There is a trailing comma in this import:
import {
ERC20,
Market,
Leverager,
IBalancerVault,
NotBalancerVault,
} from "../../contracts/periphery/Leverager.sol";
As far as I can tell, solidity doesn't support that.
lol that's embarrasing :sweat_smile: thanks for taking the time
What I'm trying to do
I've forked solhint and been trying it out against exactly's codebase
The problem
however, when updating the dependency & running
yarn lint:sol
at the tip of the aforementioned PR's tip, I get the following error:solhint-community clearly states it needs a parser of semver-range version
0.16.0
...and it has it under its own
node_modules
, and the stack trace shows that it's the one being used:what I've tried so far
If the fixes for the no-unused-import rule are rolled back (checking out the previous commit), then the linter reports them successfully.
but that's not of much help.
Also, disabling the
no-unused-import
rule doesn't prevent the crash either.