You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-12-21 22:38:40 +02:00
Introduce a cargo clippy run (#2025)
This might help catch stylistic problems in our Rust code. Related to #2587.
This commit is contained in:
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@@ -11,38 +11,6 @@ env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NIGHTLY_VERSION: nightly-2025-09-01
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install formatting dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install gettext yapf3
|
||||
|
||||
- name: Install pinned nightly for rustfmt
|
||||
run: |
|
||||
rustup toolchain install --profile minimal "$NIGHTLY_VERSION"
|
||||
rustup component add rustfmt --toolchain "$NIGHTLY_VERSION"
|
||||
|
||||
- name: Check formatting
|
||||
uses: dprint/check@v2.3
|
||||
|
||||
typos:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Check for typos
|
||||
uses: crate-ci/typos@v1.35.7
|
||||
with:
|
||||
config: ./.github/typos.toml
|
||||
|
||||
cargo:
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
55
.github/workflows/lint.yml
vendored
Normal file
55
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Rust cache
|
||||
uses: ./.github/workflows/setup-rust-cache
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy -- -Dwarnings
|
||||
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NIGHTLY_VERSION: nightly-2025-09-01
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install formatting dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install gettext yapf3
|
||||
|
||||
- name: Install pinned nightly for rustfmt
|
||||
run: |
|
||||
rustup toolchain install --profile minimal "$NIGHTLY_VERSION"
|
||||
rustup component add rustfmt --toolchain "$NIGHTLY_VERSION"
|
||||
|
||||
- name: Check formatting
|
||||
uses: dprint/check@v2.3
|
||||
|
||||
typos:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Check for typos
|
||||
uses: crate-ci/typos@v1.35.7
|
||||
with:
|
||||
config: ./.github/typos.toml
|
||||
Reference in New Issue
Block a user