Skip to content

[0.7.0beta2] when truffle-config.js is malformed, the tool reports incorrect coverage #434

@martinetlee

Description

@martinetlee

Hello team! First of all, thank you for the wonderful tool and I really like the changes to 0.7.0, made the tool really easy to use.

I'm here to report an issue I've encountered recently when using the tool with a malformed truffle-config.js.

Tested with solidity-coverage of version 0.7.0-beta.2 and Truffle version v5.0.39.

We've noticed that solidity-coverage reports incorrect result when there is a malformed truffle-config.js. The tests still succeed both in truffle test and truffle run coverage and no error or warning is reported, but the coverage data reported by the tool is extremely low.

We suggest to fix the issue either by making the coverage report correct result even when there is a malformed truffle-config.js (just like how truffle test can still run normally), or explicitly output failure to warn developers about the malformed config file.

Here's the repository for all the details to replicate the issue:
https://github.com/quantstamp/solcov-0.7.0beta2-malform-config

Hopefully that helps, have an awesome day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions