Consensys / vscode-solidity-metrics

Generate Solidity Source Code Metrics, Complexity and Risk profile reports for your project.
https://marketplace.visualstudio.com/items?itemName=tintinweb.solidity-metrics
46 stars 6 forks source link

No valid solidity source files found. #12

Closed ErrorEater closed 2 years ago

ErrorEater commented 2 years ago

Can't create metrics for a specific file. The message in the title is returned by VS Code.

jacksanford1 commented 2 years ago

Having same problem. Right clicking on contracts folder. Have reloaded Solidity Metrics and restarted VS Code.

hrishibhat commented 2 years ago

Having same problem. Right clicking on contracts folder. Have reloaded Solidity Metrics and restarted VS Code.

Were you able to sort this?

amateur-dev commented 2 years ago

Same here

tintinweb commented 2 years ago

Hey, any chance you can help reproduce this issue? It does seem to work fine here on macos latest vscode.

thanks!

zarifpour commented 2 years ago

Hey, any chance you can help reproduce this issue? It does seem to work fine here on macos latest vscode.

thanks!

It seems to be reproducible it in a workspace that contains multiple projects/repositories. However, It does work as expected when I try it in a workspace that only contains a single project.

tintinweb commented 2 years ago

great, thanks @zarifpour. I've added multi-workspace support. let me know if you run into any issues.

cheers 🙌

jacksanford1 commented 2 years ago

Thanks for fixing @tintinweb 🙏

Has made my life a lot easier (and probably @hrishibhat's too).

hrishibhat commented 2 years ago

@jacksanford1 you bet! ;)

Thanks @tintinweb

0xSenzel commented 1 year ago

Hi @tintinweb , I met with the same error when working on VS Code, hardhat JS template. I tried typescript template and empty folder none of them work. Surprisingly I tried it on Gitpod and it had no issues even on empty folder. I'm not sure what is the exactly missing packages or settings that cause this error, do we need to install any prior packages for it to work?

0xSenzel commented 1 year ago

Update: Turns out right clicking the file / folder > Solidity: Metrics doesn't work but using ctrl+shift+p in vscode works just fine. Problem only exists on my VSCode and Gitpod is fine, I created multiple different hardhat folders there is one seems to have the same issue inside Gitpod but I've compared the files they are practically the same.

Let me know if I should open an issue and what details I should give to help you figure out the problem.