Skip to content
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: override default cwd path for .solcover.js #384

Closed
PaulRBerg opened this issue Sep 8, 2019 · 5 comments
Closed

Feature request: override default cwd path for .solcover.js #384

PaulRBerg opened this issue Sep 8, 2019 · 5 comments

Comments

@PaulRBerg
Copy link
Contributor

My folder structure:

  • root
    • package1
      • .solcover.js
    • package2
      • .solcover.js

I have to do this because solidity-coverage uses req-cwd. It'd be cooler if I could override the default cwd path for .solcover.js through the CLI. It seems that solidity-coverage doesn't accept any options at all at the moment.

@cgewecke
Copy link
Member

cgewecke commented Sep 8, 2019

@PaulRBerg Ah yes, that's a good idea. Couple quick questions...

  • Is sablier the repo you'd target for this?
  • You'd like it to be like solhint in the various package.jsons? e.g
"coverage" : "npx solidity-coverage --config ../../.solcover.js" 

As a practical matter this feature would be added in the 0.7.0 release (described in #346 / implemented in #372) which contains a number of breaking changes for installation and configuration.

For sablier you'd begin declaring solidity-coverage as a plugin in your truffle config and the command would look like this:

truffle run coverage --config ../../.solcover.js 

The config path would be relative to the working_directory setting of the truffle config. Assume this would all be ok and there's nothing weird that Lerna does there but it would be nice to validate this feature on your project if you're open to that.

@PaulRBerg
Copy link
Contributor Author

Is sablier the repo you'd target for this?

Exactly! Although I haven't yet pushed to remote my local integration of solidity-coverage.

You'd like it to be like solhint in the various package.jsons? e.g

Exactly x2!

Here's the scripts I currently have for eslint and solhint:

"lint:js": "eslint --ignore-path ../../.eslintignore .",
"lint:sol": "solhint --config ../../.solhint.json --max-warnings 0 \"contracts/**/*.sol\"",

Assume this would all be ok and there's nothing weird that Lerna does there but it would be nice to validate this feature on your project if you're open to that.

I'd love to! And yeah your example command seems to be exactly what I was thinking of.

@cgewecke
Copy link
Member

cgewecke commented Sep 8, 2019

@PaulRBerg Ok awesome. Am actively looking for industrial sized projects to validate the beta against and will be starting to do some installations and integration tests next week.

I will ping you then when it looks like it might be in good enough state to try out...

@PaulRBerg
Copy link
Contributor Author

Cool!! I'm on Twitter and Telegram.

@cgewecke
Copy link
Member

Published to latest with 0.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants