Resolves a run's scope to files and lines, and turns them into the run's mutants (design notes §3, §10.1 steps 2-3).
Scopes:
:full- every.exfile underpaths, lessexclude;:files- the named files or globs, whole (excludedoes not apply to files named on purpose); a name that matches nothing is a usage error;:changed- every.exfile underpathschanged since the merge base ofbase(or the given ref) andHEAD, committed or not, plus untracked files, whole;:since- only the function clauses whose lines changed since the merge base of the ref andHEAD(git diff -U0,Juggernaut.Plan.Hunks), plus untracked files whole.
A scope that needs git fails with a usage error when git cannot answer (exit 2).
Summary
Functions
Whether a mutant of module in file is core: core holds file globs and module
patterns (MyApp.Core, "MyApp.Core.*").
The mutants of plan under config in lane, with short ids, plus each file's
compile-time site count and the ignore errors and warnings. A file that does not
parse is a usage error. In a full scan, a raw or skip route that matched no call is a
warning.
The files and lines scope covers. opts: :git, the git runner (default
Juggernaut.Plan.Git.run/2).
Types
@type file_plan() :: %{path: String.t(), lines: :all | MapSet.t(pos_integer())}
@type inventory() :: %{ mutants: [Juggernaut.Mutant.t()], files: [%{path: String.t(), compile_time: non_neg_integer()}], errors: [map()], warnings: [map()] }
@type t() :: %{scope: Juggernaut.Run.scope(), files: [file_plan()]}
Functions
Whether a mutant of module in file is core: core holds file globs and module
patterns (MyApp.Core, "MyApp.Core.*").
@spec inventory(t(), Juggernaut.Config.t(), :inner | :gate | :release) :: {:ok, inventory()} | {:error, Juggernaut.Error.t()}
The mutants of plan under config in lane, with short ids, plus each file's
compile-time site count and the ignore errors and warnings. A file that does not
parse is a usage error. In a full scan, a raw or skip route that matched no call is a
warning.
@spec resolve(Juggernaut.Config.t(), Juggernaut.Run.scope(), keyword()) :: {:ok, t()} | {:error, Juggernaut.Error.t()}
The files and lines scope covers. opts: :git, the git runner (default
Juggernaut.Plan.Git.run/2).