chore(lints): Add more abbreviation lints (#55) #170
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Style | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies on Ubuntu | |
if: runner.os == 'Linux' | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: libgtk-3-dev javascriptcoregtk-4.1 libsoup-3.0 webkit2gtk-4.1 | |
version: 1.0 | |
- name: Rust Caching | |
uses: Swatinem/rust-cache@v2 | |
- name: Install nightly rustfmt | |
# https://stegosaurusdormant.com/rustfmt-nightly/ | |
run: rustup toolchain install nightly --allow-downgrade -c rustfmt | |
- name: Lint | |
run: | | |
cargo clippy --all --all-targets -- --deny warnings | |
cargo xtask-lint --deny-warnings | |
- name: Check formatting | |
run: cargo +nightly fmt --check |