-
Notifications
You must be signed in to change notification settings - Fork 161
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
Feature request: Allow to set the path for the plugins #206
Comments
Hi @juanfranblanco, sorry for not responding before. I'm not 100% sure I understand what would work for you. In the linked issue you suggest having a flag similar to prettier's |
Don't worry, responding issues is really hard and takes time. You are right that is how it works with prettier. So the extension could do the usual magic of letting the user set it on the solhint file, in the extension user settings or if nothing is set, use the the default node_modules in the workspace. This is how I have integrated with prettier if it helps: |
I see, makes sense. Will try that approach then, thanks 👍 I guess you are using solhint as an executable binary, right? In version 3.0 we tried to also properly export it as a "library", so maybe you want to try this. That's not documented yet, but it's just:
Both config and filename are optional. In this case, I guess you'd pass the |
Oh, and we should document what is returned by that function 🤦♂️ I'll try to do it when I have some time, but for the time being you can probably figure it out by inspecting it 😅 Let me know if you have any questions about that. |
Solium is used as follows: https://github.com/juanfranblanco/vscode-solidity/blob/master/src/linter/solium.ts it was contributed by yourselves :). So all the integration is done internally. |
This is solhint, not solium 😄 |
Oh my!! Sorry :) |
@fvictorio it seems that we are having issues with extends too [solhint:recommended] will this be related, it used to work before. |
Any update on this issue ? I'd love to see custom plugins and the friendly ping @fvictorio |
Not yet, hopefully this week. |
Hey @juanfranblanco, could you try installing Solhint from github, using the You should call it like this:
Where |
I just did the same change for shareable configs (aka extends) too. Same branch, so you should be able to test it. Of course, that means that |
@juanfranblanco friendly ping |
@Jaime-Iglesias sorry a bit overboard at the moment, next week i will have some time for this ;) |
Yeah, don't worry - just wanted to make sure you had seen it - Stay safe ! |
Hey @juanfranblanco, did you have a chance to test this? |
@fvictorio no I have not had time.. did you included it in the current 3.0.0 release? |
No, it's a little risky so I wanted to validate it first. I don't use VSCode, but how hard is for me to test it myself? I guess I would need to clone your extension, add this change, and load it locally in the editor. Is that correct? |
yeah.. just clone the extension and run it :) now obviously you need to reference your package to test the change, it will be great if you could do it as you know best what to expect and how to use that package. If you need any help to get setup let me know. |
Hi all! Has there been any progress regarding this issue ? |
@Jaime-Iglesias I'm working on it, I hope to have it fixed on these days! @juanfranblanco I started looking into this but I ran into an issue. I don't know anything about developing vscode extensions, so I might be asking very silly questions. I edited This is the branch I'm working on: fvictorio/vscode-solidity@53d8f4c Of course, for that to work you have to link solhint in the |
Hi all - hope everyone is doing well! Has there been any progress on this ? |
Hey @Jaime-Iglesias, not from me, I got stuck with what I mentioned in my last comment and haven't really worked on this since then, and I don't really know when I'll have time to do it 🙁 |
No worries - I think I'll endup just ditching the solidity extension completely and switch to a different approach, solhint is too useful to let go :D Totally unrelated, just subscribed to your "exploring Ethereum", keep it up ! |
Change loadPlugin function at index.js to receive the plugin path.
ISSUE #206 - Plugins can be in any path
Revert "ISSUE #206 - Plugins can be in any path"
Hi I hope you are all well,
Vscode is not able to load the plugins as these will not be packaged with the extension, to workaround this it will be ideal if a path could be passed to load the plugins together with the list of names.
solhint/lib/rules/index.js
Line 53 in 32ec781
This is how it is handled in prettier.
Suggestion: The solhint.json file could include a path or allow to set this by the ide by setting the path to be the same as the current project node_modules.
Reference: juanfranblanco/vscode-solidity#169
The text was updated successfully, but these errors were encountered: