Package org.ek9lang.cli.coverage
package org.ek9lang.cli.coverage
HTML coverage report generation components using functional interfaces.
This package provides focused, single-responsibility classes for generating HTML coverage reports, following patterns from compiler phases 1-6.
Design Philosophy
Each component implements a functional interface (Function,
BiFunction, Supplier) enabling:
- Single responsibility - one class, one job
- Easy testing - each component can be unit tested in isolation
- Composition - components can be combined via constructor injection
- Immutability - no shared mutable state
Available Components
Section Generators (return HTML strings)
StatusBannerHtml- Pass/fail status bannerAttentionSectionHtml- Modules below thresholdMetricsSectionHtml- Code quality metricsModuleTreeHtml- Hierarchical module listingModuleRowHtml- Single module rowFunctionRowsHtml- Function coverage rowsSourceLinesHtml- Line-by-line source viewComplexityBadgeHtml- Complexity indicator
Data Collection
SourceFileCoverageCollector- Collects coverage data
Model Records
See org.ek9lang.cli.coverage.model for data transfer records.
Future Work
These components are ready to be wired into the existing
CoverageOutputFormatter.HtmlCoverageFormatter to replace
its inline methods, further reducing the class size from ~1,800 lines.
- See Also:
-
ClassesClassDescriptionGenerates the attention required section showing modules below coverage threshold.Generates HTML for a complexity badge with tooltip showing code quality metrics.Constants for coverage report generation.Centralized utility for building coverage report links.Generates HTML rows for covered and uncovered functions in a module.Generates the code quality metrics section using dial charts.Shared utilities for module coverage processing.Generates HTML for a single module row in the coverage module tree.Generates the module tree HTML showing hierarchical grouping of modules.Collects coverage data from CoverageRuntime and scans source files.Generates HTML for line-by-line source code view with coverage highlighting.Generates the status banner HTML showing pass/fail state based on coverage threshold.