Class SignatureCoverageResolver

java.lang.Object
org.ek9lang.cli.coverage.SignatureCoverageResolver

final class SignatureCoverageResolver extends Object
Resolves coverage for lines within function signatures. Single responsibility: determining if a line inherits coverage from its containing function.

Return-with-initialization lines (e.g., <- result as String: String()) are executable but always run when the function is entered. They should inherit the FUNCTION_ENTRY coverage status rather than being left uncolored.

  • Constructor Details

    • SignatureCoverageResolver

      SignatureCoverageResolver()
  • Method Details

    • resolve

      LineCoverage resolve(int lineNum, String lineContent, Map<Integer, org.ek9.lang.CoverageRuntime.ModuleFunctionInfo> functions)
      Check if a line should inherit coverage from a function's signature.
      Parameters:
      lineNum - The line number to check
      lineContent - The source line content
      functions - Map of function start lines to function info
      Returns:
      LineCoverage if line should inherit coverage, null otherwise