mirror of
https://github.com/xazukx/ts-rs.git
synced 2026-08-23 12:58:33 +00:00
Update CONTRIBUTING.md
This should help people make commits without forgetting to run `cargo +nightly fmt`
This commit is contained in:
committed by
GitHub
parent
2000e8c83f
commit
73621cb490
@@ -22,4 +22,11 @@ There is nothing special going on here - just run `cargo build`.
|
||||
To run the test suite, just run `cargo test` in the root directory.
|
||||
|
||||
### Formatting
|
||||
To ensure proper formatting, please run `cargo +nightly fmt`.
|
||||
To ensure proper formatting, please make sure you have the nigthly toolchain installed.
|
||||
After that, in the project's root directory, create a file called `.git/hooks/pre-commit` without a file extension and add the following two lines:
|
||||
```sh
|
||||
#!/bin/sh
|
||||
cargo +nightly fmt
|
||||
```
|
||||
|
||||
This will make sure your files are formatted before your commit is sent, so you don't have to manually run `cargo +nightly fmt`
|
||||
|
||||
Reference in New Issue
Block a user