Skip to content

Commit

Permalink
Create cpp_linter.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobiqua authored Jan 2, 2025
1 parent 368b40e commit fd6c6dd
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: 'file' # Use .clang-format config file.
tidy-checks: '-*' # disable clang-tidy checks.

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

0 comments on commit fd6c6dd

Please sign in to comment.