name: Lint

on: workflow_call

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  check:
    name: Check codebase
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      - name: Install Rust toolchain
        uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          cache-key: "lint"


      - name: Install mise
        uses: jdx/mise-action@v3

      - name: Run checks
        run: prek run --all-files --verbose --hook-stage manual
