Skip to content

Commit

Permalink
Add C++ format check to GitHub Actions (#2554)
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise authored Jun 16, 2023
1 parent c5bc230 commit 96d150a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: C++ Format Check

on: pull_request

jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
files-changed-only: true
tidy-checks: '-*'
version: '15' # clang-format version
file-annotations: true
step-summary: true
extensions: 'cpp,h'

- name: Failure Check
if: steps.linter.outputs.checks-failed > 0
run: echo "Some files failed the formatting check! See job summary and file annotations for more info" && exit 1

0 comments on commit 96d150a

Please sign in to comment.