name: clang-format Check

on:
  push:
    branches:
      - develop
      - master
    paths:
      - ".clang-format"
      - ".github/workflows/clang-format.yml"
      - "**/*.c"
      - "**/*.h"
  pull_request:
    paths:
      - ".clang-format"
      - ".github/workflows/clang-format.yml"
      - "**/*.c"
      - "**/*.h"

jobs:
  formatting-check:
    name: Formatting Check

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v7

    - name: Run clang-format style check
      uses: jidicula/clang-format-action@v4.18.0
      with:
        clang-format-version: 22
