Skip to content

Add tidying and linting for shell code and clean some shell up #215

Add tidying and linting for shell code and clean some shell up

Add tidying and linting for shell code and clean some shell up #215

Workflow file for this run

name: Lint
on:
push:
branches:
- "**"
tags-ignore:
- "precious-*"
pull_request:
env:
CRATE_NAME: precious
RUST_BACKTRACE: 1
# There's not much value in running self-check on multiple platforms. Either
# we're lint-clean or not. We do run on each rust target to catch warnings
# coming from clippy in future rust versions.
jobs:
lint:
name: Lint self
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt
- name: Run cargo check
run: cargo install --path . --locked
- name: Install mise
run: |
set -e
set -x
curl https://mise.run | sh
mise install
- name: "Run precious --lint"
run: $HOME/.cargo/bin/precious --debug lint --all