| @@ -14,32 +14,19 @@ test: clippy check doc unit-tests journey-tests-pure journey-tests-small journey · 13 unmodified lines |
| 14 | 14 | # run all tests, without clippy, including journey tests, try building docs |
| 15 | 15 | ci-test: check doc unit-tests journey-tests-pure journey-tests-small journey-tests-async journey-tests journey-tests-smart-release |
| 16 | 16 | |
| 17 | | −# Rejected for now, and why |
| 18 | | −# -D clippy::default-trait-access - sometimes makes imports necessary, just for a default value. It's good for more explicit typing though. |
| 19 | | −# -D clippy::range-plus-one - useful, but caused too many false positives as we use range types directly quite a lot |
| 20 | | − |
| 21 | | −clippy-flags := """ |
| 22 | | − -D clippy::cloned-instead-of-copied \ |
| 23 | | − -D clippy::explicit-iter-loop \ |
| 24 | | − -D clippy::map-unwrap-or \ |
| 25 | | − -D clippy::redundant-closure-for-method-calls \ |
| 26 | | − -D clippy::uninlined_format_args \ |
| 27 | | − -D clippy::unnested-or-patterns \ |
| 28 | | −""" |
| 29 | | − |
| 30 | 17 | # Run cargo clippy on all crates |
| 31 | | −clippy: |
| 32 | | − cargo clippy --all --tests --examples -- {{ clippy-flags }} |
| 33 | | − cargo clippy --all --no-default-features --features small -- {{ clippy-flags }} |
| 34 | | − cargo clippy --all --no-default-features --features max-pure -- {{ clippy-flags }} |
| 35 | | − cargo clippy --all --no-default-features --features lean-async --tests -- {{ clippy-flags }} |
| 18 | +clippy *clippy-args: |
| 19 | + cargo clippy --all --tests --examples -- {{ clippy-args }} |
| 20 | + cargo clippy --all --no-default-features --features small -- {{ clippy-args }} |
| 21 | + cargo clippy --all --no-default-features --features max-pure -- {{ clippy-args }} |
| 22 | + cargo clippy --all --no-default-features --features lean-async --tests -- {{ clippy-args }} |
| 36 | 23 | |
| 37 | 24 | # Run cargo clippy on all crates, fixing what can be fixed, and format all code |
| 38 | 25 | clippy-fix: |
| 39 | | − cargo clippy --fix --all --tests --examples -- {{ clippy-flags }} |
| 40 | | − cargo clippy --fix --allow-dirty --all --no-default-features --features small -- {{ clippy-flags }} |
| 41 | | − cargo clippy --fix --allow-dirty --all --no-default-features --features max-pure -- {{ clippy-flags }} |
| 42 | | − cargo clippy --fix --allow-dirty --all --no-default-features --features lean-async --tests -- {{ clippy-flags }} |
| 26 | + cargo clippy --fix --all --tests --examples |
| 27 | + cargo clippy --fix --allow-dirty --all --no-default-features --features small |
| 28 | + cargo clippy --fix --allow-dirty --all --no-default-features --features max-pure |
| 29 | + cargo clippy --fix --allow-dirty --all --no-default-features --features lean-async --tests |
| 43 | 30 | cargo fmt --all |
| 44 | 31 | |
| 45 | 32 | # Build all code in suitable configurations |