vscode-solidity icon indicating copy to clipboard operation
vscode-solidity copied to clipboard

Multiple Workspaces: Linting doesn't work with multi-root workspaces

Open CodeForcer opened this issue 3 years ago • 8 comments

Although it styles the code and performs the compilation, this extension doesn't seem to lint properly when using multi-root workspaces with either Solhint or Solium.

It works fine when you open a single project folder, just not multi-root

CodeForcer avatar Mar 28 '21 16:03 CodeForcer

Yes, correct. All the extension works around a single workspace. So it is not just linting.

juanfranblanco avatar Mar 28 '21 22:03 juanfranblanco

It seems the linter doesn't pickup .solhint.json configs inside a subdir. Is it configurable in the extension settings? It would be nice to let the extension pickup .solhint.json inside a subdir, or configure it where to look for .solhint.json in a monorepo.

sebastiantf avatar Jul 18 '21 06:07 sebastiantf

same issue for me, I guess it is linked to this: https://forum.openzeppelin.com/t/trouble-importing-openzeppelin-contracts-into-vs-code/5230/7

iboxgithub avatar Sep 17 '21 15:09 iboxgithub

Was anybody able to solve this ever? Quite annoying behavior...

markokhman avatar Jan 20 '22 07:01 markokhman

nope

iboxgithub avatar Jan 20 '22 10:01 iboxgithub

I am looking at it now

juanfranblanco avatar Jan 20 '22 10:01 juanfranblanco

nice 😄 thanks!

iboxgithub avatar Jan 20 '22 10:01 iboxgithub

It is checked in now.

@sebastiantf regarding subdirectories and mono repos, if it is at root the file will work as usual (single workspace), although yes with multiple workspaces the root is in each workspace, that will need copy and paste. The solution will be to have an absolute location for the config file, which will add complications in the future for web support.

juanfranblanco avatar Jan 23 '22 08:01 juanfranblanco