Open Jaime-Iglesias opened 4 years ago
@Jaime-Iglesias is the .solhint.json file at root?
@juanfranblanco yep
@Jaime-Iglesias First test without .solhint.json:
@juanfranblanco without the .solhint.json
and with it, the rules in the settings
work just fine
Ok I have tested it again with a file:
And to make sure it just works with the file:
What it may have happened is that you need to restart vscode due to a problem before. Try again by adding the file. A syntax error might have caused a crash.
hmmm, the problem does not seem to be with the file but with the extension not being able to detect the solhint plugin since it's clear that the rules in the .solhint.json
that do not belong to the custom plugin are being enforced
Ahh I got you, yes the extension does not recognize plugins, where do you host your plugins?
Ahh I got you, yes the extension does not recognize plugins, where do you host your plugins?
What do you mean where I host ? I install them locally after publishing them (as per the solhint docs), hope that answers the question haha
Yes if you install them locally the extension might not be able to find them. I do need to do some research on this, or raise it with the solium guys.
Yes if you install them locally the extension might not be able to find them. I do need to do some research on this, or raise it with the solium guys.
So if they are globally installed they do work ? (haven't tried that option yet) also thank you
At the moment the extension does not load the plugins section, i can add that and check it globally.
At the moment the extension does not load the plugins section, i can add that and check it globally.
That would be great!
Ofc, ideally, loading them locally would be huge but progress is progress, thx again.
@Jaime-Iglesias quick test, it does not work i have added the no-foos rules install your package globally and nothing, it will have to be find and loaded dynamically by the extension into solhint, similar to prettier.
@Jaime-Iglesias quick test, it does not work i have added the no-foos rules install your package globally and nothing, it will have to be find and loaded dynamically by the extension into solhint, similar to prettier.
@juanfranblanco I just tried it myself too but no luck either, it's weird since solhint
supports plugins out of the box, I guess it's causde by how the Extension itself manages all these packages
@Jaime-Iglesias looking at the source would have been faster https://github.com/protofire/solhint/blob/32ec781509c9b76db325d0c2db91c8c478441d6a/lib/rules/index.js#L53
there is a require there, which won't be triggered as the extensions cannot access those. Prettier provides a path setting that allows for the discovery of plugins, something they could implement.
@Jaime-Iglesias looking at the source would have been faster https://github.com/protofire/solhint/blob/32ec781509c9b76db325d0c2db91c8c478441d6a/lib/rules/index.js#L53
there is a require there, which won't be triggered as the extensions cannot access those. Prettier provides a path setting that allows for the discovery of plugins, something they could implement.
I see, so it's a solhint
problem after all - I wonder if they will manage to fix it, I don't know how active the project is.
@Jaime-Iglesias I have added an issue for this https://github.com/protofire/solhint/issues/206
@Jaime-Iglesias I have added an issue for this protofire/solhint#206
@juanfranblanco much appreciated, hopefully they will be able to support this, as I think it defenitely can bring a lot of value for both projects.
Hey @juanfranblanco I hope you are doing well,
Is there any update regarding this issue and https://github.com/juanfranblanco/vscode-solidity/issues/170 ?
stay safe !
friendly ping @juanfranblanco
@Jaime-Iglesias thanks for the ping!! I do need this as sometimes notifications get lost (you can find me in the Nethereum gitter if you need anything). The issue is still open with the solhint guys / gals, the best way is to chase that issue there, once is fixed on their side it could be integrated here.
@Jaime-Iglesias thanks for the ping!! I do need this as sometimes notifications get lost (you can find me in the Nethereum gitter if you need anything). The issue is still open with the solhint guys / gals, the best way is to chase that issue there, once is fixed on their side it could be integrated here.
Ah I see, I thought it was depending on you - sorry about that hahaha! Thanks and stay safe !
I'm trying to use the rules on a custom solhint plugin by changing the
.solhint.json
configuration file. The rules themselves work as I can lint the file manually using the terminal and I get the expected errors, but I cannot manage to make the Solidity plugin itself detect these custom rules.I have changed the settings to explicitly use
solhint
as per the documentation i.eAnd I have changed the
.solhint.json
as per the Solhint docs too.Any idea of what I am doing wrong?