Skip to content

Commit

Permalink
More contribution ideas
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed May 5, 2023
1 parent 9fcdde4 commit 2328570
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Contributing to cargo-mutants

Pull requests are welcome.

If the change is not obvious please feel free to open a bug or Github discussion first.

If you are interested in working on a bug or feature please say so on the bug first to avoid wasted work, and feel free to talk or ask about the approach.
If you're interested in adding a feature or fixing a bug, thank you! Please
start by reading this document and opening a Github discussion or bug about the
thing you want to do, to avoid wasted work. void wasted work, and feel free to
talk or ask about the approach.

Please also read the [DESIGN.md](DESIGN.md) file for technical information not specifically about posting contributions.

Expand All @@ -13,6 +12,14 @@ Please also read the [DESIGN.md](DESIGN.md) file for technical information not s
This project is conducted in accord with the [Rust Code of
Conduct](https://www.rust-lang.org/policies/code-of-conduct).

## Try it on a new tree

One of the most helpful things you can do is to try cargo-mutants on a new tree: either your own project
or an important open source project:

* Did cargo-mutants hang, error, or otherwise fail to run? If so a bug with reproduction instructions would be very helpful.
* Were the mutants interesting or helpful in understanding coverage or test quality? Did it generate any new tests that were accepted into the tree?

## Rust Style

Generally, variables and parameters should be the `snake_case` version of their
Expand Down Expand Up @@ -66,3 +73,12 @@ As a result, attaching a debugger to the test binary will let you see the code t
Probably the easiest path is to just make note of the command run by the test, and then run that command yourself, under a debugger, outside of the test suite. For example, `./target/debug/cargo-mutants -d ./testdata/tree/factorial --list`.

You may wish to turn off the timeouts with `-t 0`.

## Generating new mutations

The largest area for new work at the moment is in generating new mutations. Most of the code for this is in `visit.rs`.

If you look in `mutants.out/debug.log` you can see messages like `Return type is not recognized, trying Default`.
These might be good places to add a new more specific pattern.

Also `mutants.out/unviable.txt` might suggest ways to generate new patterns that are viable.

0 comments on commit 2328570

Please sign in to comment.