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:
28
.github/workflows/lint.yml
vendored
28
.github/workflows/lint.yml
vendored
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user