ScopeLift / flexible-voting

💪🗳️ Flexible Voting – A Powerful Building Block for DAO Governance
https://flexiblevoting.com
MIT License
85 stars 8 forks source link

Use relative imports for interfaces #63

Closed apbendi closed 10 months ago

apbendi commented 10 months ago

When importing Flexible Voting into another repository, the forge coverage tool was failing with the error: "Could not read source code for analysis" linked to the imports of interface files from the FlexibleVotingClient contract. While the non-relative imports work fine in the context of this repo, and even in the context of running tests normally when used as an import, they cause an issue for the coverage tool.

It's unclear if this is a bug with foundry or something with our configuration. Regardless, the easiest fix is simply to use relative imports, which we do here.

Read more about the issue here: https://github.com/foundry-rs/foundry/issues/2915

github-actions[bot] commented 10 months ago

Coverage after merging relative-imports into master will be

70.45%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   FlexVotingClient.sol0%0%0%0%104, 113–114, 114, 114, 116, 116, 116–117, 119, 119, 119–121, 121, 121–123, 123, 123–124, 126, 136–137, 137, 137, 141, 159, 162, 171, 174, 177, 183, 186, 188–190, 197, 204, 210, 99
   FractionalPool.sol81.52%80%71.43%84.48%111, 114, 191, 194–195, 198, 202, 228, 239, 80, 82–83, 85
   GovernorCountingFractional.sol96.25%91.67%100%97.78%173, 176, 284