chore(ci): Lint small feature sets

This commit is contained in:
Ed Page 2021-12-07 21:18:35 -06:00
parent e9b19d676b
commit ea6829b08e
4 changed files with 20 additions and 11 deletions

View file

@ -175,7 +175,9 @@ jobs:
override: true
components: clippy
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-features --all-targets -- -D warnings
- name: Lint (ultra-minimal)
run: make clippy-minimal ARGS='--manifest-path Cargo.toml'
- name: Lint (minimal)
run: make clippy-minimal
- name: Lint (all)
run: make clippy-all

View file

@ -100,7 +100,9 @@ jobs:
override: true
components: clippy
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-features --all-targets -- -D warnings
- name: Lint (ultra-minimal)
run: make clippy-minimal ARGS='--manifest-path Cargo.toml'
- name: Lint Minimal
run: make clippy-minimal
- name: Lint All
run: make clippy-all

View file

@ -10,7 +10,7 @@ ifneq (${TOOLCHAIN_TARGET},)
ARGS+=--target ${TOOLCHAIN_TARGET}
endif
_FEATURES = minimal default wasm full release
_FEATURES = minimal default wasm full debug release
_FEATURES_minimal = --no-default-features --features "std"
_FEATURES_default =
_FEATURES_wasm = --features "derive cargo env unicode yaml regex unstable-replace unstable-multicall unstable-grouped"
@ -18,6 +18,8 @@ _FEATURES_full = --features "derive cargo env unicode yaml regex unstable-replac
_FEATURES_debug = ${_FEATURES_full} --features debug
_FEATURES_release = ${_FEATURES_full} --release
_FEATURES_all = --all-features
check-%:
cargo check ${_FEATURES_${@:check-%=%}} --all-targets ${ARGS}
@ -26,3 +28,6 @@ build-%:
test-%:
cargo test ${_FEATURES_${@:test-%=%}} ${ARGS}
clippy-%:
cargo clippy ${_FEATURES_${@:clippy-%=%}} ${ARGS} --all-targets -- -D warnings

View file

@ -15,7 +15,7 @@ For more information try --help
";
#[cfg(not(feature = "suggestions"))]
static PV_ERROR: &'static str = "error: \"slo\" isn't a valid value for '-O <option>'
static PV_ERROR: &str = "error: \"slo\" isn't a valid value for '-O <option>'
\t[possible values: \"ludicrous speed\", fast, slow]
USAGE:
@ -37,7 +37,7 @@ For more information try --help
";
#[cfg(not(feature = "suggestions"))]
static PV_ERROR_ESCAPED: &'static str = "error: \"ludicrous\" isn't a valid value for '-O <option>'
static PV_ERROR_ESCAPED: &str = "error: \"ludicrous\" isn't a valid value for '-O <option>'
\t[possible values: \"ludicrous speed\", fast, slow]
USAGE: