Skip to content

Covering auto-generated files not checked into git #91

@elringus

Description

@elringus

What product do you want to improve?
Not sure. Probably both Uploader and Web application.

Is your feature request related to a problem? Please describe.
I’m covering code generated on build, which is not checked into git.

The code is not known at compile time and has to be generated on build (hence it can’t be checking in git), but still needs to be tested and covered; I believe that’s a fair use case.

Everything works fine locally and on CI: I can test and generate coverage report for the generated code (vitest command: https://github.com/Elringus/DotNetJS/blob/feat/revamp/JavaScript/package.json#L4). But codecov ignores the report, because the covered files are not in git.

Describe the solution you'd like
Codecov will pick coverage for files not checked with git, respect their coverage in the context of the total solution coverage and display the files on the webapp.

The non-git files may be marked as virtual/generated and don't have link to github repo.

Describe alternatives you've considered
My current workaround is to throw an error when coverage is below 100%, but I really wish codecov could support generated files.

Additional context
Migrated from https://community.codecov.com/t/covering-auto-generated-files-not-checked-into-git/4508

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions