Skip to content

test: inject any SDK configuration overrides as scope tags (#5702) #1013

test: inject any SDK configuration overrides as scope tags (#5702)

test: inject any SDK configuration overrides as scope tags (#5702) #1013

name: Check Code Formatting
on:
push:
branches:
- main
paths:
- "**/*.h"
- "**/*.hpp"
- "**/*.c"
- "**/*.cpp"
- "**/*.m"
- "**/*.mm"
- ".github/workflows/lint-clang-formatting.yml"
- ".clang-format"
pull_request:
paths:
- "**/*.h"
- "**/*.hpp"
- "**/*.c"
- "**/*.cpp"
- "**/*.m"
- "**/*.mm"
- ".github/workflows/lint-clang-formatting.yml"
- ".clang-format"
jobs:
format-code:
# While ubuntu runners have clang-format preinstalled, they use an older version. We want to use the most recent one,
# that we can easily install locally via brew.
name: Check Formatting of Clang Format
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Install tooling
run: make init-ci-format
- name: Format with Clang
run: make format-clang
- name: Check for Formatting Changes
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "❌ Some code formatted with clang-format is not formatted correctly. Please run 'make format' and commit the changes."
git status
git diff
exit 1
else
echo "✅ All code is formatted correctly."
fi