Skip to content

Commit e4772ea

Browse files
committed
docs: adjust contributing.md: remove need for --all (--workspace)
It is no longer needed to add `--all` (which is an alias for `--workspace`). The documentation says "Commands run in the workspace root will run against all workspace members by default" [0]. We however still need `--tests` as this activates the building of tests in `<crate>/tests` directories. [0] https://doc.rust-lang.org/cargo/reference/workspaces.html#virtual-workspace Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
1 parent 3847e09 commit e4772ea

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,28 @@ for each submitted Pull Request (PR).
1919

2020
## Basic Checks
2121

22+
```sh
23+
# We currently rely on nightly-only formatting features
24+
cargo +nightly fmt --all
25+
cargo check --all-targets --tests
26+
cargo clippy --all-targets --tests
27+
# Please note that this will not execute integration tests.
28+
cargo test --all-targets --tests
29+
30+
# To lint your last three commits
31+
gitlint --commits "HEAD~3..HEAD"
32+
```
33+
34+
### \[Optional\] Run Integration Tests
35+
36+
_Caution: These tests are taking a long time to complete (40+ mins) and need special setup._
37+
38+
```sh
39+
bash ./scripts/dev_cli.sh tests --integration -- --test-filter '<optionally filter test by name pattern>'
40+
```
41+
42+
### Setup Commit Hook
43+
2244
Please consider creating the following hook as `.git/hooks/pre-commit` in order
2345
to ensure basic correctness of your code. You can extend this further if you
2446
have specific features that you regularly develop against.
@@ -27,8 +49,8 @@ have specific features that you regularly develop against.
2749
#!/bin/sh
2850

2951
cargo +nightly fmt --all -- --check || exit 1
30-
cargo check --locked --all --all-targets --tests || exit 1
31-
cargo clippy --locked --all --all-targets --tests -- -D warnings || exit 1
52+
cargo check --locked --all-targets --tests || exit 1
53+
cargo clippy --locked --all-targets --tests -- -D warnings || exit 1
3254
```
3355

3456
You will need to `chmod +x .git/hooks/pre-commit` to have it run on every

0 commit comments

Comments
 (0)