Prometheus CVE Exporter is a Golang application that scans your system for all installed packages and compares them with the recent NVD JSON feed. It exports metrics that provide insights into the security status of your packages.
We need to enhance our Go project by implementing code coverage checks to ensure that our tests are effectively covering our codebase. This will help us identify untested parts of our code and improve overall code quality.
Tasks:
[x] Integrate coverage tool: Set up a code coverage tool compatible with Go (e.g., go test -cover or go test -coverprofile).
[x] Configure CI/CD pipeline: Update the CI/CD configuration to include coverage checks and generate coverage reports.
[ ] Add coverage thresholds: Define acceptable coverage thresholds and fail the build if they are not met.
[x] Generate coverage reports: Ensure coverage reports are generated and available for review (e.g., as HTML or in CI/CD build logs).
[x] Document coverage process: Update the project documentation to include information on how coverage is measured and how to interpret the reports.
Additional Notes:
Review existing test cases to identify areas where coverage might be lacking.
Consider integrating with code quality tools that provide coverage metrics as part of their analysis. (SonarQube, Snyk, Codecov, etc.)
Test the coverage integration thoroughly to ensure accurate reporting.
Issue Description:
We need to enhance our Go project by implementing code coverage checks to ensure that our tests are effectively covering our codebase. This will help us identify untested parts of our code and improve overall code quality.
Tasks:
go test -cover
orgo test -coverprofile
).Additional Notes: