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

fix: exclude specific folders from coverage #26

Closed
stact opened this issue Jun 12, 2024 · 3 comments
Closed

fix: exclude specific folders from coverage #26

stact opened this issue Jun 12, 2024 · 3 comments
Labels
bug Something isn't working as expected p1 High-priority issues at the top of the work list

Comments

@stact
Copy link

stact commented Jun 12, 2024

Description
Hi team, we are not able exclude folders from coverage, I don't know if it's a bug, or
For instance we have generated folder that include our localization

`very_good test --coverage --exclude-coverage "lib/l10n/**"``

Steps To Reproduce

  1. On your project folder create dummy folder with some dart files
  2. Open a terminal
  3. "cd" to your flutter project folder
  4. Launch the coverage very_good test --coverage --exclude-coverage "lib/l10n/**"
  5. See the results of the coverage (using vscode flutter coverage extension)

Expected Behavior
The folder excluded must be ignored for coverage

Screenshots
image

Additional Context
Tried also to ignore files directly it's not working too

@stact stact added the bug Something isn't working as expected label Jun 12, 2024
@tomarra
Copy link
Contributor

tomarra commented Aug 27, 2024

Hi @stact 👋 thanks for opening this issue. From a quick glance at this we were able to reproduce this so were going to look into the --exclude-coverage flag and it's implementation.

We are always willing to let contributors help with fixes as well. Would you be willing to help with this?

@tomarra tomarra moved this from Needs Triage to Todo in VGV Open Source 🦄 🧙🌟 Aug 27, 2024
@tomarra tomarra added the p1 High-priority issues at the top of the work list label Aug 27, 2024
@stact
Copy link
Author

stact commented Aug 27, 2024

Hi @tomarra thank you for reaching out
Unfortunately my knowledge is limited regarding coverage.
I was looking in the past some alternative, maybe this PR can help to adapt the vg test dart-archive/coverage#496

@tomarra tomarra moved this from Todo to Backlog in VGV Open Source 🦄 🧙🌟 Sep 10, 2024
@stact
Copy link
Author

stact commented Oct 30, 2024

Ok it seems something is wrong with very_good test --coverage firstly generated

This solution solved my issue VeryGoodOpenSource/very_good_cli#496 (comment)

lcov --remove coverage/lcov.info '**/generated/**' -o coverage/lcov.info

No problem also on ci.

build:
    uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
    with:
      flutter_channel: stable
      coverage_excludes: "**/generated/**" 

Thank you for your followup @tomarra maybe it can be removed from the backlog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected p1 High-priority issues at the top of the work list
Projects
Development

No branches or pull requests

2 participants