Giter Club home page Giter Club logo

Comments (3)

Joelkw avatar Joelkw commented on July 16, 2024

@tjkandala would be curious to know how difficult a fix might be here -- is there a good way we can display 0% at the file level in addition to the directory level here? Or did you intentionally not display 0% at the file level for some reason?

from sourcegraph-codecov.

felixfbecker avatar felixfbecker commented on July 16, 2024

This seems to only be a problem for Go, as the coverage reports from Go do not mention packages at all that have zero tests. In TypeScript/JavaScript for example this is not a problem: running nyc --all will include all files not excluded by config, even those that have no tests. "Files excluded by config" is usually any non-JS file and the test files themselves. If you look at the screenshot above, you would not want "0%" to be displayed for the _test.go files, as that would be confusing (at first sight it would look like something is wrong, but really those files can't have tests because they are tests themselves). You also wouldn't want "0%" to be displayed for JSON, YAML config files or markdown files.

So the best fix would be for the Go coverage report that's being uploaded to mention all files considered source files, if there is a flag for that in the Go CLI. This is, btw, generally important because otherwise those files will not be considered for the overall repo coverage percentage calculation and the coverage will look much better than it is because it pretends all packages with 0 tests just don't exist.

The second option would be logic and config on the codecov.yml or extension settings level to include those files. But again, really those files should be included in the coverage report, else numbers will be incorrect. Codecov could perhaps include additional LOC per config, but when it comes to function and branch coverage that would start to add a lot of complexity to their backend and the Go CLI would be in a much better position to provide all that.

from sourcegraph-codecov.

thomasrockhu-codecov avatar thomasrockhu-codecov commented on July 16, 2024

Closing due to deprecation

from sourcegraph-codecov.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.