MutagenEx.Pipeline.EnumeratorFacade behaviour (mutagen_ex v0.2.0)

Copy Markdown View Source

Behaviour for the :enumerator slot of the Mix.Tasks.Mutagen dispatch table.

Production default: MutagenEx.MutationEnumerator. The Mix task calls mod.enumerate(ast_cache, scope_records, covered_lines, opts) with the accumulated scope + coverage state.

Summary

Callbacks

Enumerate mutation sites against ast_cache filtered by covered_lines. Returns either an enumeration map (%{sites, skipped, warnings}) or {:error, :too_many_sites, details} when the cap from opts[:max_sites] is exceeded.

Callbacks

enumerate(ast_cache, scope_records, covered_lines, opts)

@callback enumerate(
  ast_cache :: map(),
  scope_records :: [map()],
  covered_lines :: map(),
  opts :: keyword()
) ::
  %{sites: list(), skipped: list(), warnings: list()}
  | {:error, :too_many_sites, map()}

Enumerate mutation sites against ast_cache filtered by covered_lines. Returns either an enumeration map (%{sites, skipped, warnings}) or {:error, :too_many_sites, details} when the cap from opts[:max_sites] is exceeded.