Skip to content

Add github action to check that all files are formatted #4

Add github action to check that all files are formatted

Add github action to check that all files are formatted #4

name: Clang Format Check
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install clang-format
run: sudo apt-get install -y clang-format
- name: Run clang-format check
run: |
files=$(find . -type f \( -name '*.[ch]' -o -name '*.cpp' -o -name '*.hpp' \) ! -path './src/vcpkg/*' ! -path './src/build/*')
for file in $files; do
clang-format --dry-run -Werror $file
done