Skip to content

Add a formatting style and apply it to the entire repo #14

Add a formatting style and apply it to the entire repo

Add a formatting style and apply it to the entire repo #14

Workflow file for this run

name: Run Clang-Format Check
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
clang-format-check:
runs-on: ubuntu-latest
steps:
- name: Install Python and clang-format to get newer version
run: |
python3 -m pip install --upgrade pip
pip install clang-format
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Clang-Format
run: sudo apt-get install -y clang-format
- name: Check formatting with Clang-Format
run: |
FILES=$(find . -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp')
clang-format --version
for file in $FILES; do
clang-format --dry-run -Werror "$file"
done