mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 07:12:32 +00:00
bfa388420b
There is enough open work on this, we should probably not have it public yet, so putting it behind a gate. See https://github.com/clap-rs/clap/issues/2924
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Lint
|
|
on:
|
|
pull_request:
|
|
branches: [master]
|
|
push:
|
|
branches: [staging, trying]
|
|
concurrency:
|
|
group: lint-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt, clippy
|
|
- name: Cache Builds
|
|
uses: Swatinem/rust-cache@v1
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Clippy for almost no features
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --no-default-features --features "std cargo"
|
|
- name: Clippy for all features
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --features "wrap_help yaml regex unstable-replace unstable-multicall unstable-grouped" -- -D warnings
|
|
- name: Format check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: -- --check
|