Files
2026-04-17 20:09:41 +03:00

33 lines
727 B
YAML

name: Lint & Format Check
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
format-check:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install clang-format
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20
sudo apt-get install -y clang-format-20
# - name: Install cmake-format
# run: pip install cmake-format
- name: Check C/C++ formatting
run: |
find include src tests \
-type f \( -name '*.cpp' -o -name '*.h' -o -name '*.hpp' -o -name '*.c' \) \
| xargs clang-format-20 --dry-run --Werror