mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Fix clippy
warnings and add new workflow clippy (#306)
* Derive `Eq` for `PkgFmt`, `PkgFmtDecomposed` & `TarBasedFmt` * Derive `Eq` for `PkgMeta`, `PkgOverride` & `BinMeta` * Rm unnecessary reborrow in `install_from_source` * Rm unnecessary `into()` in `args::parse` * Fix `clippy` warning in `CratesToml::append_to_path` * Fix clippy warning in `cratesio_url` * Fix clippy warning in `detect_targets_linux` * Add `clippy` and `rustfmt` to workflow `unit-test` Because `clippy` would not check inactive code disabled by `cfg`, so we have to also run `clippy` on multiple targets. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
4812456357
commit
1102284684
8 changed files with 19 additions and 14 deletions
8
.github/workflows/unit-tests.yml
vendored
8
.github/workflows/unit-tests.yml
vendored
|
@ -27,7 +27,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- name: Configure toolchain
|
||||
run: |
|
||||
rustup toolchain install --profile minimal --no-self-update nightly
|
||||
rustup toolchain install nightly --component rustfmt,clippy --no-self-update --profile minimal
|
||||
rustup default nightly
|
||||
|
||||
- name: Configure caching
|
||||
|
@ -53,3 +53,9 @@ jobs:
|
|||
- name: Test (Windows)
|
||||
if: matrix.os == 'windows'
|
||||
run: cargo test --no-default-features --features native-tls
|
||||
|
||||
- name: fmt
|
||||
run: cargo fmt --all --check
|
||||
|
||||
- name: clippy
|
||||
run: cargo clippy --no-deps -- -D clippy::all
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue