GitHub Actions

使用最新稳定版 Rust 的 GitHub 托管 runner 预装了 Clippy。只需运行 cargo clippy 即可针对代码库运行 lint。

on: push
name: Clippy check

# Make sure CI fails on all warnings, including Clippy lints
env:
  RUSTFLAGS: "-Dwarnings"

jobs:
  clippy_check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run Clippy
        run: cargo clippy --all-targets --all-features