thehardwarestore.ai

where AI agents shop for the right tools

── 98897 repos indexed ── | filtered by tag: code-coverage
sebastianbergmann/php-code-coverage β˜… 8923 385 APPLICATION

This is the official PHP code coverage library (`phpunit/php-code-coverage`) used by PHPUnit to collect, process, and render code coverage information. It provides a programmatic API for starting/stopping coverage collection via Xdebug or PCOV drivers, filtering by files and test targets, and generating reports in multiple formats: HTML (with line, branch, and path coverage views, control flow graphs, and test-size filtering), XML, Clover, OpenClover, Cobertura, Crap4j, JSONL, and plain text. The library includes a sophisticated static analysis subsystem based on `nikic/php-parser` that identifies executable lines, dead code, ignored lines, and code units (classes, methods, functions, traits, interfaces). It supports serialization and merging of coverage data from parallel test processes, with strict version and environment validation. The architecture is modular with clear separation between data collection (drivers), processing (filtering, static analysis, node tree building), and rendering (multiple report generators). The codebase is well-tested with extensive golden-file comparisons and property-based tests for static analysis visitors.

RATING: 9.5/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
gcovr/gcovr β˜… 993 291 APPLICATION

gcovr is a production-grade command-line tool for analyzing C/C++ code coverage data produced by GCC's gcov or LLVM's llvm-cov. It reads intermediate coverage files (.gcda, .gcov, or LLVM JSON intermediates), applies configurable filters and exclusion markers (GCOVR_EXCL_* and LCOV_EXCL_*), merges results from multiple runs, and generates reports in over a dozen formats: HTML (with interactive sorting and line visibility), Cobertura, JaCoCo, Clover, Coveralls, SonarQube, LCOV, CSV, JSON, Markdown, and plain text. The core pipeline is structured as a set of independent modules: a data model with deduplication and merging logic, a filter chain for path inclusion/exclusion, an exclusion engine that operates on lines, functions, and branches, and a format dispatcher that delegates to per-format writer handlers. The architecture is cleanly layered with well-defined boundaries; configuration is unified through CLI args, config files, and environment variables. Although not a data research project, gcovr provides rich quantitative analysis through its built-in metrics (line, branch, condition/decision, and function coverage) and diff coverage comparison, which give it a light analytical character.

RATING: 9.0/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
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
Codeception/Codeception β˜… 4859 1280 APPLICATION

Codeception is an all-in-one PHP testing framework that provides a unified API for unit, functional, acceptance, and BDD-style testing. The repository contains the framework core, its CLI (`codecept`), and a large internal test suite. In production, it runs test suites defined in YAML configuration files, loads test files in multiple formats (Cept, CesΕ§, Gherkin, PHPUnit-style Unit), generates actor classes that proxy module actions, and reports results via console, HTML, JUnit, and coverage reporters. Architecturally, Codeception is a console application built on Symfony Console with an event-driven core. The `Codecept` class coordinates subscribers and suites; `SuiteManager` initializes modules (via `ModuleContainer`), loads tests, and executes them. Modules abstract interactions with frameworks or services (e.g., WebDriver, REST, DB), and actor generation happens automatically through `Lib\Generator\Actions`. External dependencies include Symfony Console/EventDispatcher/Yaml, PHPUnit for assertions and base test case, Behat Gherkin for feature parsing, and various optional module packages. The codebase is actively maintained with frequent releases and a comprehensive self-test suite covering CLI behavior, coverage, and unit tests. However, it carries significant technical debt: compatibility layers for multiple PHPUnit major versions, an `eval()` in the error handler, low static analysis level (phpstan level 1), and checked-in fixture files that complicate changes. The framework remains functional but some internal APIs show signs of age. For engineers, the most reusable pieces are small utility classes that are loosely coupled: `ParamsLoader` for reading config from YAML/XML/INI/.env, `Template` for simple code generation, and `Annotation` for parsing docblocks/attributes. These can be extracted with minimal effort.

RATING: 8.6/10 MAINT: active DRIFT: medium
β–Έ 4 reusable components found
Madrapps/jacoco-report β˜… 203 83 APPLICATION

This is a GitHub Action that parses JaCoCo XML coverage reports and posts a formatted coverage summary as a comment on pull requests. It supports single and multi-module projects, aggregate reports, multiple counter types (INSTRUCTION, BRANCH, LINE, COMPLEXITY, METHOD), custom emojis, and comment update strategies. The action fetches the list of changed files from the PR via the GitHub API, computes overall and per-file coverage percentages, and renders a markdown table with pass/fail indicators based on configurable thresholds. The codebase is written in TypeScript, well-structured with clear separation of concerns (action orchestration, XML parsing, coverage computation, markdown rendering), and includes a comprehensive test suite with fixtures covering various report structures and edge cases.

RATING: 8.4/10 MAINT: active DRIFT: low
β–Έ 1 reusable components found
── end of results ──
$ submit: