Comments (3)
@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.
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.
Closing due to deprecation
from sourcegraph-codecov.
Related Issues (20)
- TypeError: Cannot read property 'report' of undefined when repo has no coverage HOT 1
- Coverage overlay for PRs HOT 6
- Type errors on master HOT 1
- Decorations not appearing on GitHub HOT 2
- Hiding coverage does not hide hit annotations HOT 5
- No code coverage decorations on non-test file after "Load diff" clicked HOT 2
- "Coverage: X%" button doesn't appear by default
- Set API token for private repositories reports error when viewing a file page HOT 1
- Plugin does not work for private repository HOT 2
- request: allow customization of line coverage colors ( accessibility ) HOT 1
- Broken Codecov test coverage background colors? HOT 1
- Issue with Firefox on private repository HOT 5
- Update Codecov extension colors for github dark mode HOT 1
- Tag Codecov with "Insights"
- Doesn't work on Firefox HOT 2
- code cov highlighting requires refresh on github.com HOT 1
- Doesn't work entirely HOT 1
- Authorization no longer works with Codecov API v2. Migrate to API v2. HOT 1
- "Learn more" link for deprecation is 404 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sourcegraph-codecov.