Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: lint

on:
pull_request:

jobs:
clang-format:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format-14

- name: Check clang-format
run: |
if [ ! -f .clang-format ]; then
echo "No .clang-format found, skipping check."
exit 0
fi
find . \( -name "*.cpp" -o -name "*.hpp" -o -name "*.h" \) \
! -path "./build/*" ! -path "./install/*" \
| xargs clang-format-14 --dry-run --Werror
Loading