Problem
README.md displays a Codecov badge but the project is not integrated with Codecov.io, resulting in a broken/misleading badge.
Evidence
README.md Badge (Line ~5)
[](https://codecov.io/gh/FlossWare/jcommons)
Codecov Integration Status
# Check CI workflows for codecov upload
grep -r "codecov" .github/workflows/*.yml
# (no output - NO codecov integration)
What the Badge Shows
Clicking the badge likely shows:
- "Unknown" coverage
- "No coverage data"
- OR redirects to Codecov sign-up
Actual Coverage
JaCoCo Reports (local only):
- 93% instruction coverage
- 86% branch coverage
- 100% class coverage
- Generated in
target/site/jacoco/
But not uploaded to Codecov, so badge is meaningless.
Current Badges in README
| Badge |
Status |
Accuracy |
| Build Status |
✅ Working |
Accurate |
| Codecov |
❌ Broken |
Not configured |
| License |
✅ Working |
Accurate |
| Maven Central |
⚠️ Misleading |
Says "packagecloud" but links to packagecloud.io (OK) |
| Java Version |
✅ Working |
Accurate |
| Coverage (manual) |
✅ Working |
Accurate (but manual - needs updates) |
| Quality |
✅ Working |
Accurate (but manual) |
Impact
1. User Confusion
- Badge shows coverage data doesn't exist
- Users think project has poor/no coverage
- Reality: 93% coverage - excellent!
2. Misleading Information
- Badge implies Codecov integration
- Developers may expect coverage reports on Codecov
- Reality: Coverage only in CI artifacts
3. Maintenance Burden
If Codecov not intended:
- Broken badge in prominent location
- Needs removal or replacement
If Codecov intended:
- Missing integration setup
- Badge premature
Root Cause Analysis
Likely Scenario
Issue #161 recommended adding coverage badges:
Add Codecov/Coveralls + shields.io badges
Someone added Codecov badge before setting up Codecov integration.
What's Missing
.github/workflows/main.yml needs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./target/site/jacoco/jacoco.xml
fail_ci_if_error: false
AND Codecov account setup at https://codecov.io
Recommended Solutions
Option 1: Complete Codecov Integration (Recommended if using Codecov)
1. Sign up at Codecov.io
2. Get Codecov Token
- Codecov dashboard → Repository Settings → Copy token
- Add to GitHub Secrets:
CODECOV_TOKEN
3. Update CI Workflows
Add to main.yml and pr-validation.yml:
- name: Generate JaCoCo Coverage Report
run: mvn jacoco:report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./target/site/jacoco/jacoco.xml
flags: unittests
name: codecov-jcommons
fail_ci_if_error: false
4. Verify Badge Works
After first upload, badge should show actual coverage (93%).
Option 2: Replace with Manual Badge (Simpler)
If not using Codecov, replace with shields.io static badge:
<!-- Remove codecov badge -->
- [](https://codecov.io/gh/FlossWare/jcommons)
<!-- Add manual coverage badge -->
+ 
Benefits:
- No external service needed
- Accurate coverage display
- Simple to maintain
Drawbacks:
- Must manually update when coverage changes
- No coverage history/trends
- No PR coverage diff comments
Option 3: Use Coveralls Instead
Alternative to Codecov:
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./target/site/jacoco/jacoco.xml
Badge:
[](https://coveralls.io/github/FlossWare/jcommons?branch=main)
Current Coverage Reporting
What Works ✅
- JaCoCo generates reports:
target/site/jacoco/
- CI uploads coverage artifacts (pr-validation.yml)
- Can download and view reports manually
What's Missing ❌
- No public coverage dashboard
- No coverage history tracking
- No PR coverage comparison
- Badge doesn't reflect actual data
Comparison: Manual vs Service Badges
Manual Coverage Badge

Pros:
- Simple, no setup
- No external dependencies
- Always accurate (when updated)
Cons:
- Manual updates required
- No historical data
- No PR integration
Codecov/Coveralls Badge
Pros:
- Auto-updates on every commit
- Coverage history/trends
- PR diff comments ("Coverage increased 2%")
- Interactive coverage browser
- Quality gate enforcement
Cons:
- Requires account setup
- External service dependency
- Slightly more complex CI config
Recommendation
For Production Library (Like jcommons)
Use Codecov or Coveralls (Option 1 or 3):
- Shows commitment to quality
- Transparent coverage tracking
- Industry standard for open-source
Time investment: ~15 minutes setup
For Personal/Small Projects
Use manual badge (Option 2):
- Quick, simple
- No maintenance overhead
- Good enough for small projects
Documentation Updates
If Using Codecov
Add to README:
## Code Coverage
This project maintains high test coverage tracked via [Codecov](https://codecov.io/gh/FlossWare/jcommons):
- 93% instruction coverage
- 86% branch coverage
- 100% class coverage
Coverage reports are generated on every commit.
If Using Manual Badge
Add to CONTRIBUTING.md:
## Updating Coverage Badge
After coverage changes:
1. Run: `mvn jacoco:report`
2. Check: `target/site/jacoco/index.html`
3. Update README.md badge: `coverage-XX%25`
Verification
After Codecov Integration
- Check Codecov dashboard shows data
- Badge displays correct percentage
- Click badge → should show detailed coverage
- Open PR → should see coverage comment
After Manual Badge
- Badge shows correct percentage (93%)
- Color is green (>90% = green)
- Link goes somewhere useful (Actions or coverage report)
Related
Problem
README.md displays a Codecov badge but the project is not integrated with Codecov.io, resulting in a broken/misleading badge.
Evidence
README.md Badge (Line ~5)
Codecov Integration Status
What the Badge Shows
Clicking the badge likely shows:
Actual Coverage
JaCoCo Reports (local only):
target/site/jacoco/But not uploaded to Codecov, so badge is meaningless.
Current Badges in README
Impact
1. User Confusion
2. Misleading Information
3. Maintenance Burden
If Codecov not intended:
If Codecov intended:
Root Cause Analysis
Likely Scenario
Issue #161 recommended adding coverage badges:
Someone added Codecov badge before setting up Codecov integration.
What's Missing
.github/workflows/main.yml needs:
AND Codecov account setup at https://codecov.io
Recommended Solutions
Option 1: Complete Codecov Integration (Recommended if using Codecov)
1. Sign up at Codecov.io
2. Get Codecov Token
CODECOV_TOKEN3. Update CI Workflows
Add to main.yml and pr-validation.yml:
4. Verify Badge Works
After first upload, badge should show actual coverage (93%).
Option 2: Replace with Manual Badge (Simpler)
If not using Codecov, replace with shields.io static badge:
Benefits:
Drawbacks:
Option 3: Use Coveralls Instead
Alternative to Codecov:
Badge:
Current Coverage Reporting
What Works ✅
target/site/jacoco/What's Missing ❌
Comparison: Manual vs Service Badges
Manual Coverage Badge
Pros:
Cons:
Codecov/Coveralls Badge
Pros:
Cons:
Recommendation
For Production Library (Like jcommons)
Use Codecov or Coveralls (Option 1 or 3):
Time investment: ~15 minutes setup
For Personal/Small Projects
Use manual badge (Option 2):
Documentation Updates
If Using Codecov
Add to README:
If Using Manual Badge
Add to CONTRIBUTING.md:
Verification
After Codecov Integration
After Manual Badge
Related