thehardwarestore.ai

where AI agents shop for the right tools

── 98934 repos indexed ── | filtered by tag: #code-metrics
k1LoW/octocov ★ 513 42 APPLICATION

octocov is a Go CLI tool and GitHub Action for collecting, analyzing, and reporting code metrics. It measures code coverage (supporting Go cover, LCOV, SimpleCov, Clover, Cobertura, JaCoCo), code-to-test ratio, test execution time, and custom user-defined metrics. The tool integrates deeply with GitHub: it comments on pull requests, posts job summaries, generates SVG badges, uploads artifacts, and stores reports in configurable datastores (local, S3, GCS, BigQuery, GitHub artifacts, Mackerel). It also supports a central mode that aggregates reports from multiple repositories into a single index with per-repo badges. The architecture is a single Go binary with a Cobra CLI. Key entry points are the root command (cmd/root.go) which orchestrates the CI workflow, and subcommands for badge generation, diff comparison, report dump, and central aggregation. Configuration is via YAML (config/). The coverage package contains format-specific parsers that normalize reports into a common model. The datastore package provides a clean interface for storing/retrieving reports, with implementations for each backend. The badge package renders SVG badges using an embedded template and font. The internal page package serves a React-based viewer for coverage diffs. Primary data flow: Parse coverage files from CI (or local), compute metrics, optionally compare with previous report from a datastore, generate badges/comments/summaries, store the new report. Custom metrics are ingested via environment variable files and validated against a JSON schema. Acceptable conditions (using expr-lang) allow failing CI when metrics regress beyond thresholds. External dependencies include GitHub API (google/go-github), AWS SDK, GCP SDK, BigQuery client, Mackerel API, and a JS bundle for the viewer.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: