Add tidying and linting for shell code and clean some shell up #215
Workflow file for this run
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: 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 |