Skip to content

Commit cea8db5

Browse files
authored
Add clippy to CI and CONTRIBUTING.md (#35)
1 parent 56577bf commit cea8db5

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/rust.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v2
18+
- name: Run linter (clippy)
19+
# Will fail when encountering warnings
20+
run: |
21+
rustup component add clippy
22+
cargo clippy -- -D warnings
1823
- name: Build
1924
run: cargo build --verbose
2025
- name: Docker setup

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,21 @@ $ cargo test -- --test-threads=1
4545

4646
Each PR should pass the tests to be accepted.
4747

48+
### Clippy
49+
50+
Each PR should pass [`clippy`](https://github.com/rust-lang/rust-clippy) (the linter) to be accepted.
51+
52+
```bash
53+
$ cargo clippy -- -D warnings
54+
```
55+
56+
If you don't have `clippy` installed on your machine yet, run:
57+
58+
```bash
59+
$ rustup update
60+
$ rustup component add clippy
61+
```
62+
4863
### Release Process
4964

5065
MeiliSearch tools follow the [Semantic Versioning Convention](https://semver.org/).

0 commit comments

Comments
 (0)