1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 21:33:27 +00:00

Run clippy and rustfmt on CI (#12388)

* Run clippy and rustfmt on CI

* Error on warnings and fix a couple of missed lints

* Move import inside function

* Fix unix lints

* Fix windows lints

* Missed some async tests

* Remove unneeded reference
This commit is contained in:
Daniel García
2024-12-19 22:49:45 +01:00
committed by GitHub
parent 40943b5929
commit fff412665f
23 changed files with 132 additions and 128 deletions

View File

@@ -58,3 +58,31 @@ jobs:
run: |
npm ci
npm run lint
rust:
name: Run Rust lint on ${{ matrix.os }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check Rust version
run: rustup --version
- name: Run cargo fmt
working-directory: ./apps/desktop/desktop_native
run: cargo fmt --check
- name: Run Clippy
working-directory: ./apps/desktop/desktop_native
run: cargo clippy --all-features --tests
env:
RUSTFLAGS: "-D warnings"