Skip to content

Commit

Permalink
Testing out GitHub C++ linter workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
joestanding committed Apr 16, 2024
1 parent 51a2af1 commit 652f328
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: cpp-linter
on:
pull_request:
branches: [main, master, develop]
paths: ['**.c', '**.cpp', '**.h', '**.hpp', '**.cxx', '**.hxx', '**.cc', '**.hh', '**CMakeLists.txt', 'meson.build', '**.cmake']
push:
branches: [main, master, develop]
paths: ['**.c', '**.cpp', '**.h', '**.hpp', '**.cxx', '**.hxx', '**.cc', '**.hh', '**CMakeLists.txt', 'meson.build', '**.cmake']

jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# ... optionally setup build env to create a compilation database

- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: '' # disable clang-format checks.
tidy-checks: '' # Use .clang-tidy config file.

- name: Fail fast?!
if: steps.linter.outputs.clang-tidy-checks-failed > 0
run: exit 1

0 comments on commit 652f328

Please sign in to comment.