Skip to content

chore: apply macros and aliases (#45) #32

chore: apply macros and aliases (#45)

chore: apply macros and aliases (#45) #32

Workflow file for this run

name: C++ Formatting
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y wget software-properties-common
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19
sudo apt-get install -y clang-format-19
- name: Run clang-format
run: |
find . -name '*.cpp' -or -name '*.h' | xargs clang-format-19 -i -style=file
- name: Check for changes
run: |
git diff --exit-code || (echo "Code formatting issues found. Please run clang-format locally and commit the changes." && exit 1)