mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
After some discussion with XVar, Song and Yakei we found out that cargo clippy
is a superset of cargo check
.
There are multiple hints:
- one guy in discord https://discord.gg/nWGhnbRb https://discord.com/channels/273534239310479360/335502067432947748/798886188923617290
- a old stackoverflow https://stackoverflow.com/questions/57449356/is-cargo-clippy-a-superset-of-cargo-check which lead us to the source code:
7fa1d78c89/src/main.rs (L73)
which either uses `check` or `fix`.
cargo fix is documented in the docs with (https://doc.rust-lang.org/cargo/commands/cargo-fix.html)
"executing cargo fix will under the hood execute cargo-check(1)."
- `cargo clippy` fails after running `cargo check` prob as there is nothing to do.
- `cargo clippy --help` points us to `cargo check --help`
Thus we are removing `cargo check` from the CI as a seperate check.
However `cargo check --examples` did check the examples.
In order to have them covered we are also running clippy now for examples, benches and all bins.
Also we moved `--locked` from cargo check to clippy.
This commit is contained in:
parent
11deb97d5a
commit
68be467138
@ -1,18 +1,10 @@
|
|||||||
check:
|
# cargo clippy is a superset of cargo check, so we don't check manually
|
||||||
extends: .recompile-branch
|
|
||||||
stage: check
|
|
||||||
script:
|
|
||||||
- ln -s /dockercache/cache-all target
|
|
||||||
- cargo check --locked
|
|
||||||
- cargo check --examples --locked
|
|
||||||
|
|
||||||
code-quality:
|
code-quality:
|
||||||
extends: .recompile-branch
|
extends: .recompile-branch
|
||||||
stage: check
|
stage: check
|
||||||
script:
|
script:
|
||||||
- ln -s /dockercache/cache-all target
|
- ln -s /dockercache/cache-all target
|
||||||
- cargo clippy -- -D warnings
|
- cargo clippy --tests --examples --benches --bins --locked -- -D warnings
|
||||||
- cargo clippy --tests -- -D warnings
|
|
||||||
- cargo fmt --all -- --check
|
- cargo fmt --all -- --check
|
||||||
|
|
||||||
security:
|
security:
|
||||||
|
Loading…
Reference in New Issue
Block a user