History

Merge branch 'cargo-config-toml'

Sebastian Thiel committed 3 years ago

Commit 12f4cec2 parents 036e60a 396edb93 files · +33 −23Browse files

Unified · Split

3 files
  1. .cargo/config.toml +23 −0
  2. .github/workflows/ci.yml +1 −1
  3. justfile +9 −22
.cargo/config.toml+23−0
@@ -0,0 +1,23 @@
1[target.'cfg(any(test, not(test)))']
2rustflags = [
3 # Rustc lints
4 # "-W", "warning_name"
5 # "-A", "warning_name"
6
7 # Clippy lints
8 "-W", "clippy::cloned_instead_of_copied",
9 "-W", "clippy::explicit_iter_loop",
10 "-W", "clippy::map_unwrap_or",
11 "-W", "clippy::redundant_closure_for_method_calls",
12 "-W", "clippy::unnested_or_patterns",
13 "-W", "clippy::uninlined_format_args",
14
15 # Rejected for now, and why
16 # "-W" "clippy::default_trait_access" - sometimes makes imports necessary, just for a default value. It's good for more explicit typing though.
17 # "-W" "clippy::range_plus_one" - useful, but caused too many false positives as we use range types directly quite a lot
18
19
20 # Rustdoc lints
21 # "-W", "rustdoc::warning_name"
22 # "-A", "rustdoc::warning_name"
23]
.github/workflows/ci.yml+1−1
@@ -144,7 +144,7 @@ jobs: · 143 unmodified lines
144 components: clippy,rustfmt144 components: clippy,rustfmt
145 - uses: extractions/setup-just@v1145 - uses: extractions/setup-just@v1
146 - name: Run cargo clippy146 - name: Run cargo clippy
147 run: just clippy147 run: just clippy -D warnings
148 - name: Run cargo doc148 - name: Run cargo doc
149 run: just doc149 run: just doc
150 - name: Run cargo fmt150 - name: Run cargo fmt
justfile+9−22
@@ -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 docs14# run all tests, without clippy, including journey tests, try building docs
15ci-test: check doc unit-tests journey-tests-pure journey-tests-small journey-tests-async journey-tests journey-tests-smart-release15ci-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
21clippy-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 crates17# Run cargo clippy on all crates
31clippy:18clippy *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 code24# Run cargo clippy on all crates, fixing what can be fixed, and format all code
38clippy-fix:25clippy-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 --all30 cargo fmt --all
44 31
45# Build all code in suitable configurations32# Build all code in suitable configurations

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t