| @@ -14,32 +14,19 @@ test: clippy check doc unit-tests journey-tests-pure journey-tests-small journey · 13 unmodified lines |
| 14 | # run all tests, without clippy, including journey tests, try building docs | 14 | # run all tests, without clippy, including journey tests, try building docs |
| 15 | ci-test: check doc unit-tests journey-tests-pure journey-tests-small journey-tests-async journey-tests journey-tests-smart-release | 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 | # Run cargo clippy on all crates | 17 | # Run cargo clippy on all crates |
| 31 | clippy: | 18 | clippy *clippy-args: |
| 32 | cargo clippy --all --tests --examples -- {{ clippy-flags }} | 19 | cargo clippy --all --tests --examples -- {{ clippy-args }} |
| 33 | cargo clippy --all --no-default-features --features small -- {{ clippy-flags }} | 20 | cargo clippy --all --no-default-features --features small -- {{ clippy-args }} |
| 34 | cargo clippy --all --no-default-features --features max-pure -- {{ clippy-flags }} | 21 | cargo clippy --all --no-default-features --features max-pure -- {{ clippy-args }} |
| 35 | cargo clippy --all --no-default-features --features lean-async --tests -- {{ clippy-flags }} | 22 | cargo clippy --all --no-default-features --features lean-async --tests -- {{ clippy-args }} |
| 36 | | 23 | |
| 37 | # Run cargo clippy on all crates, fixing what can be fixed, and format all code | 24 | # Run cargo clippy on all crates, fixing what can be fixed, and format all code |
| 38 | clippy-fix: | 25 | clippy-fix: |
| 39 | cargo clippy --fix --all --tests --examples -- {{ clippy-flags }} | 26 | cargo clippy --fix --all --tests --examples |
| 40 | cargo clippy --fix --allow-dirty --all --no-default-features --features small -- {{ clippy-flags }} | 27 | cargo clippy --fix --allow-dirty --all --no-default-features --features small |
| 41 | cargo clippy --fix --allow-dirty --all --no-default-features --features max-pure -- {{ clippy-flags }} | 28 | cargo clippy --fix --allow-dirty --all --no-default-features --features max-pure |
| 42 | cargo clippy --fix --allow-dirty --all --no-default-features --features lean-async --tests -- {{ clippy-flags }} | 29 | cargo clippy --fix --allow-dirty --all --no-default-features --features lean-async --tests |
| 43 | cargo fmt --all | 30 | cargo fmt --all |
| 44 | | 31 | |
| 45 | # Build all code in suitable configurations | 32 | # Build all code in suitable configurations |