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
Index Page Generators
StatusBannerHtml- Pass/fail status bannerAttentionSectionHtml- Modules below thresholdMetricsSectionHtml- Code quality metricsModuleTreeHtml- Hierarchical module listingModuleRowHtml- Single module row
Module Page Generators
SourceFileRowsHtml- Source file rows with coverage/readabilityFunctionRowsHtml- Function coverage rowsModuleMetricsSectionHtml- Module complexity metricsModuleAttentionSectionHtml- Module uncovered branches
File Summary Page Generators
FileMethodRowsHtml- File method coverage rowsFileBranchRowsHtml- File branch coverage rowsFileMetricsSectionHtml- File complexity/readability metricsFileAttentionSectionHtml- File uncovered items
Source View Generators
SourceLinesHtml- Line-by-line source viewComplexityBadgeHtml- Complexity indicator
Text Formatters
CoverageTextPrinter- Terminal output for covered/uncovered items
Data Collection
SourceFileCoverageCollector- Collects coverage data
Model Records
See org.ek9lang.cli.coverage.model for data transfer records.
Integration
All components are wired into
CoverageOutputFormatter.HtmlCoverageFormatter via
one-liner delegate methods, keeping the formatter as a thin orchestrator.
- See Also:
-
ClassDescriptionGenerates the attention required section showing modules below coverage threshold.Generates HTML badge for branch coverage indicators.Generates HTML for a complexity badge with tooltip showing code quality metrics.Constants for coverage report generation.Centralized utility for building coverage report links.Prints covered and uncovered items (methods, branches, statements) to a text stream.Supplies all covered probes as a unified ProbeData stream.Filters modules below coverage threshold and sorts by coverage (worst first).Generates attention required section for a file summary page.Generates branch rows HTML for a file summary page.Generates method rows HTML for a file summary page.Generates file-level metrics section using dial charts.Generates HTML rows for covered and uncovered functions in a module.Generates the code quality metrics section using dial charts.Generates attention required section for a module detail page.Groups modules by their top-level package name.Calculates aggregate statistics for a group of modules.Collects ModuleInfo for all modules from CoverageRuntime.Generates module-specific metrics section using dial charts.Extracts module name from EK9 source file.Generates HTML for a single module row in the coverage module tree.Generates the module tree HTML showing hierarchical grouping of modules.Processes coverage probes into file-based coverage maps.Generates HTML for a profiling badge with tooltip showing runtime performance data.Detects if a source line is a return declaration with initialization.Determines severity level based on coverage percentage.Severity levels for coverage status.Maps severity level to CSS class and icon.Visual styling for a severity level.Resolves coverage for lines within function signatures.Collects coverage data from CoverageRuntime and scans source files.Builds SourceFileInfo objects from coverage data.Generates HTML rows for source files in a module detail page.Groups source files by their module name.Scans file system for EK9 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.Supplies all uncovered probes as a unified ProbeData stream.