-
Notifications
You must be signed in to change notification settings - Fork 2
/
CONTRIBUTING_FINAL.md.liquid
56 lines (43 loc) · 1.77 KB
/
CONTRIBUTING_FINAL.md.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Contributing Guidelines
There are some things that should be kept in mind when contributing to this project.
- Commit messages must follow the [conventional commits](https://www.conventionalcommits.org) specification. This enables automated [CHANGELOG.md](CHANGELOG.md) generation by using [`git-cliff`](https://git-cliff.org).
- Each commit is should pass CI on its own.
- Bug fixes and feature additions should be accompanied by tests.
### Recommended developer tools:
##### LSPs
* [`typos-lsp`](https://github.com/tekumara/typos-lsp)
* [`taplo`](https://github.com/tamasfe/taplo)
* [`rust-analyzer`](https://github.com/rust-lang/rust-analyzer)
{% if include_precommit -%}
### Using pre-commit hooks
This project makes use of [`pre-commit`](https://pre-commit.com/) hooks. A `pre-commit install` is recommended once the repository has been cloned, unless it has been [auto-enabled](https://pre-commit.com/#automatically-enabling-pre-commit-on-repositories).
{%- endif %}
### Running tests
Pretty standard procedure apart from noting that some tests may be behind feature flags, so:
```sh
cargo test --all-features
```
{% if include_mdbook -%}
Book testing may be done by:
```sh
mdbook test
```
{%- endif %}
### Generating and opening documentation
```sh
cargo doc --no-deps --all-features --open
```
{% if include_mdbook -%}
Book documentation may be generated by installing [`mdbook`](https://rust-lang.github.io/mdBook/guide/installation.html) before running `mdbook serve --open`.
{%- endif %}
## Release (for maintainers)
1. Make sure CI is not failing.
2. Bump version in the workspace `Cargo.toml` file.
3. Finally:
```sh
# <release> should match [0-9]+.[0-9]+.[0-9]+
git commit -am "chore: release <release>"
git tag "<release>"
git cliff -o CHANGELOG.md
git push && git push --tags
```