• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gdassori / micelio / 22018627484
85%

Build:
DEFAULT BRANCH: master
Ran 14 Feb 2026 01:57PM UTC
Jobs 1
Files 20
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Feb 2026 01:56PM UTC coverage: 84.471% (+0.4%) from 84.11%
22018627484

push

github

gdassori
Add configuration validation

Implements Config.Validate() to catch invalid configuration at startup
instead of failing later with unclear errors.

Changes:
- Add Validate() method that validates all config fields
- Validate addresses: listen addresses allow wildcards, peer addresses reject them
- Validate numeric fields: MaxPeers, ExchangeInterval, DiscoveryInterval (allow 0, reject negative)
- Validate log level: debug, info, warn, warning, error (case-insensitive)
- Return all validation errors together using errors.Join()
- Call validation in main.go after CLI flag overrides

Test coverage:
- Valid configurations
- Invalid addresses (missing port, wildcards, empty host)
- Invalid numeric values (negative)
- Invalid log levels
- Multiple simultaneous errors
- Edge cases (empty optional fields, zero intervals, whitespace log levels)

Code quality:
- Extract helper methods to reduce cognitive complexity
- Use constants for test literals
- Add godoc to all validation methods

1980 of 2344 relevant lines covered (84.47%)

214.97 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
73.03
-1.32% noise.go
6
95.68
3.38% config.go
19
0.0
0.0% main.go
Jobs
ID Job ID Ran Files Coverage
1 22018627484.1 14 Feb 2026 01:57PM UTC 20
84.47
GitHub Action Run
Source Files on build 22018627484
  • Tree
  • List 20
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22018627484
  • 301e0098 on github
  • Prev Build on master (#22018370974)
  • Next Build on master (#22018771235)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc