Juggernaut.View.Github (Juggernaut v0.4.0)

Copy Markdown View Source

The GitHub Actions format (--format github, design notes §5.4): one workflow-command annotation per survivor, then the run summary as one annotation.

::error file=lib/a.ex,line=41,col=5,title=Survived mutant Grant.check/2%3Arelational%3A4be1c09::relational:>=: @@ -41 +41 @@%0A-a > b%0A+a >= b

A survivor on core, or in a file that failed its threshold (or in any file when the run as a whole failed per: :run), is an ::error; others are ::warning. The summary is an ::error unless the gate passed (::notice). After it, each mutant killed only by integration tests (it counts as killed) is a ::notice at its line, so a reviewer sees where no unit test catches the change. Values are escaped as the Actions toolkit does: %, CR and LF in messages, and also : and , in properties. Every survivor is printed; GitHub itself shows only a limited number of annotations per step, so the summary repeats the counts.

Options: see Juggernaut.View.

Summary

Functions

Escapes a workflow-command message (%, CR, LF).

Escapes a workflow-command property value (as escape_data/1, plus : and ,).

The annotations of run, one per line.

Functions

escape_data(text)

@spec escape_data(String.t()) :: String.t()

Escapes a workflow-command message (%, CR, LF).

escape_property(value)

@spec escape_property(term()) :: String.t()

Escapes a workflow-command property value (as escape_data/1, plus : and ,).

render(run, opts)

The annotations of run, one per line.