Skip to content

Mutation score 75/80 for the command entry and exit codes #40

Description

@jonbaldie

Parent

Part of #33.

What to build

Strong tests for the command entry: argument parsing, option validation, exit
code selection, and the usage text. This includes --ignore-tests,
--minimumpriority, --strict, --reportfile, --only,
--ignore-errors-on-exit, and --ignore-violations-on-exit.

Exit code selection is the contract in the README table: 0 for a clean run, 1
for an error, 2 for findings, and errors take precedence. Today a mutation of a
precedence branch or an option name can escape. After this ticket the tests
cover each option, each rejection message, and each exit code path.

Acceptance criteria

  • The gate command scoped to src/lib.rs and src/main.rs exits 0. It prints a total MSI of 75
    percent or more, and a covered-code MSI of 80 percent or more.
  • The run uses --coverage and the full Cargo test suite, less the
    packaging smoke test.
  • Every new test calls messrust::run. It asserts the exit code, the
    standard output text, or the standard error text. No new public item
    exists only to make a test possible.
  • Production code that no test can reach through the command is deleted. A
    #[cfg(test)] unit test does not replace deletion.
  • No rule behaviour changes, unless a mutant proves the code is dead.
  • No mutator-disable comment is added under src. No baseline file
    and no blacklist file is added.
  • cargo test passes. cargo clippy --all-targets adds no new warning.
  • A comment on this ticket records the two scores.

Blocked by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions