name: linter
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Run Rust code linting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: linting with clippy
run: cargo clippy --all --