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

Latest release 5.4.0 does not exclude files where it did before this version #707

Closed
JeroenJSmit opened this issue Nov 13, 2024 · 5 comments
Labels

Comments

@JeroenJSmit
Copy link

Describe the bug
We have been excluding generated function app (C#) code from the test coverage results successfully until the latest version 5.4.0 which states it actually fixes that but seems to break it.

To Reproduce
We call the report generator tool in a DevOps pipeline using the following script

  - script: >-
      reportgenerator
      -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml
      -targetdir:$(Build.SourcesDirectory)/coverlet/reports
      -assemblyfilters:+*;-*.*.Tests
      -filefilters:+*;-*.g.cs
      -reporttypes:"Cobertura"
    displayName: Generate Coverage Reports

The relevant part is the filefilters excluding "*.g.cs".

Since this morning the reported coverage in our pipelines dropped with about 7%.
Tested using version 5.3.11 explicitly (previous version) and the coverage went back to what it was yesterday (so +7%).

From the documentation I do not see a change in how I should pass in the excluded files with a wildcard, so this feels like a regression to me.

@TobiasLoeschVolue
Copy link

Same here. With the latest version 5.4.0 some of our test files are no longer excluded, the configuration for the GitHub-Action is unchanged.

- name: Generate coverage report
      if: ${{ github.triggering_actor != 'dependabot[bot]' }}
      uses: danielpalme/[email protected]
      with:
        reports: ./src/TestResults/*/coverage.cobertura.xml
        targetdir: coveragereport
        sourcedirs: ./src
        reporttypes: 'MarkdownSummaryGithub;Cobertura'
        verbosity: Info
        toolpath: reportgeneratortool
        assemblyfilters: '-*.Tests.dll'
        filefilters: '-*M7Schema.V*.cs;-*Tests.cs;-*.g.cs'

@danielpalme
Copy link
Owner

I will have a look as soon as possible.

@danielpalme
Copy link
Owner

Release 5.4.1 is now available. It should fix the problem.

@boevik
Copy link

boevik commented Nov 13, 2024

Thank you for quick fix

@JeroenJSmit
Copy link
Author

Very quick indeed! Thanks

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

No branches or pull requests

4 participants