name: Code format checks

on:
  pull_request:
    paths:
      - '.github/workflows/**'
      - 'src/**'
      - '.clang-format'
  push:
    paths:
      - '.github/workflows/**'
      - 'src/**'
      - '.clang-format'

jobs:
  lint:
    name: Lint code with clang-format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: jidicula/clang-format-action@4726374d1aa3c6aecf132e5197e498979588ebc8
        with:
          clang-format-version: '20'
          check-path: 'src'
          exclude-regex: '(sdk|\.proto)'