Skip to content

Fix gofmt formatting and push code coverage to 80%#24

Merged
0x524a merged 1 commit intomainfrom
fix/coverage-and-gofmt
Apr 11, 2026
Merged

Fix gofmt formatting and push code coverage to 80%#24
0x524a merged 1 commit intomainfrom
fix/coverage-and-gofmt

Conversation

@0x524a
Copy link
Copy Markdown
Owner

@0x524a 0x524a commented Apr 11, 2026

Summary

  • Fix gofmt formatting in 6 files (goreportcard gofmt score was 72.73%)
  • Push code coverage from 74.5% to 80.0% with targeted tests

Coverage by package

Package Before After
collector 94.4% 96.0%
config 97.5% 97.5%
plugin 91.5% 92.3%
orchestrator 87.8% 87.8%
server 85.2% 88.9%
shipper 74.7% 85.1%
Total 74.5% 80.0%

Test plan

  • go test -race ./... — all pass
  • gofmt -l cmd/ internal/ — no unformatted files
  • go vet ./... — clean

Coverage: 74.5% -> 80.0%
- orchestrator: ship retry success/failure, deadline warning, lastShipDuration tests
- plugin: truncate, LastStderr, AddExecPlugin, PluginCount, GetTimeout, IsEnabled tests
- collector: parsePrometheusLine edge cases, parseMetrics all type branches, Name()
- shipper: TLS constructor branches (self-signed cert tests), NewFileShipper defaults
- server: Shutdown without Start
- security: bad plugins dir, nil labels, multiple labels
- Fix gofmt formatting in 6 files
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.82%. Comparing base (4b42d1e) to head (2f553ba).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
+ Coverage   72.53%   77.82%   +5.28%     
==========================================
  Files          18       18              
  Lines        1664     1664              
==========================================
+ Hits         1207     1295      +88     
+ Misses        386      305      -81     
+ Partials       71       64       -7     
Flag Coverage Δ
unittests 77.82% <ø> (+5.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@0x524a 0x524a merged commit f793e70 into main Apr 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants