Skip to content

Commit

Permalink
Update CONTRIBUTING.md with running working version of cargo-insta (
Browse files Browse the repository at this point in the history
#632)

I realize this was quite helpful for me, took me a while to figure it
out.

Also some general spring-cleaning
  • Loading branch information
max-sixty authored Oct 4, 2024
1 parent c1137fe commit e36302f
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,40 @@ solve with the feature and maybe provide some ideas for how to go about that.

## Running the Tests

When you want to contribute directly please make sure to run the tests and
format the code before making a pull request. Tests are also run in CI but
it's typically easier to run them locally.

To run all tests a makefile is provided

```sh
make test
```

If you want to format the code you can quickly run this command:
To format the code, run:

```sh
make format
```

## Conduct
To run the version of `cargo-insta` in the working directory, run:

This issue tracker follows the [Rust Code of Conduct]. For escalation or moderation
issues please contact Armin ([email protected]) instead of the Rust moderation team.
```sh
cargo run -p cargo-insta -- test # (or `review` or whatever command you want to run)
```

[rust code of conduct]: https://www.rust-lang.org/policies/code-of-conduct
...in contrast to running `cargo insta`, which invokes the installed version of
`cargo-insta`, and so make iterating more difficult.

## Writing tests

If making non-trivial changes to `cargo-insta`, please add an integration test to
`cargo-insta/tests/main.rs`. Feel free an issue if anything is unclear.

## Website / Documentation

If you want to do changes to the website or documentation have a look at the
To make changes to the website or documentation, have a look at the
separate [insta-website](https://github.com/mitsuhiko/insta-website) repository.

## Conduct

This issue tracker follows the [Rust Code of Conduct]. For escalation or moderation
issues please contact Armin ([email protected]) instead of the Rust moderation team.

[rust code of conduct]: https://www.rust-lang.org/policies/code-of-conduct

0 comments on commit e36302f

Please sign in to comment.