mirror of
https://github.com/clap-rs/clap
synced 2024-12-05 02:29:12 +00:00
chore(ci): Lint small feature sets
This commit is contained in:
parent
e9b19d676b
commit
ea6829b08e
4 changed files with 20 additions and 11 deletions
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
|
10
.github/workflows/rust-next.yml
vendored
10
.github/workflows/rust-next.yml
vendored
|
@ -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
|
||||
|
|
7
Makefile
7
Makefile
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue