# SPDX-FileCopyrightText: 2026 undoredo contributors
#
# SPDX-License-Identifier: MIT OR Apache-2.0

name: cargo-fmt

on:
  push:
  pull_request:

permissions:
  contents: read

jobs:
  check-formatting:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt

      - name: Check formatting
        run: cargo fmt --all -- --check
