Skip to content

Commit

Permalink
Add clippy lint GitHub Actions CI
Browse files Browse the repository at this point in the history
Run `cargo clippy --all-targets --all-features` on Continuous Integration on every Pull Request and push to main. Adapted from https://doc.rust-lang.org/stable/clippy/continuous_integration/github_actions.html
  • Loading branch information
weiji14 committed May 16, 2024
1 parent 56f30de commit e647018
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Clippy check

on:
push:
branches: [ "main" ]
pull_request:
types: [ opened, reopened, synchronize ]
branches: [ "main" ]

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

jobs:
clippy_check:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run Clippy
run: cargo clippy --all-targets --all-features

0 comments on commit e647018

Please sign in to comment.