31 lines
1.2 KiB
Markdown
31 lines
1.2 KiB
Markdown
|
# Development Workflow
|
||
|
|
||
|
## 1. Pull Down Code
|
||
|
`git clone` the repository of whatever code you're wanting to work on.
|
||
|
Make a new branch for the feature you want to do.
|
||
|
|
||
|
Maybe it's a new feature, or fixing a bug *(please file it in the issue tracker!)*.
|
||
|
|
||
|
## 2. Do Coding
|
||
|
Work on your code however you do it, make sure to `cargo fmt` before each commit, sign your commits, and commit fairly often.
|
||
|
|
||
|
## 3. Test
|
||
|
### Clippy
|
||
|
Run this `clippy` command, and try and ensure there are no warnings:
|
||
|
```bash
|
||
|
cargo clippy -- -W clippy::pedantic -W clippy::suspicious -W clippy::complexity -W clippy::perf -W clippy::cargo -W clippy::nursery -W clippy::unwrap_used -D warnings
|
||
|
```
|
||
|
### Automated Tests
|
||
|
Run `cargo test` to ensure all of the [tests](https://doc.rust-lang.org/book/ch11-00-testing.html) still pass.
|
||
|
If needed, add your own tests for your new code.
|
||
|
|
||
|
### Run
|
||
|
Of course, manually run the code in a [VM](/user/virtual-machine.md) and see if everything works how it should.
|
||
|
|
||
|
## 3. Document
|
||
|
Use inline [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) to document your code.
|
||
|
|
||
|
## 4. Push
|
||
|
Push the code to a new branch in the repository.
|
||
|
If it's ready and fully working, make a pull request to merge it into `main`.
|