Skip to content

WIP

WIP #3

Workflow file for this run

name: cpp-linter

Check failure on line 1 in .github/workflows/cpp-linter.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cpp-linter.yml

Invalid workflow file

(Line: 4, Col: 3): Unexpected value 'workflow_dispatch:workflow_dispatch'
on:
workflow_dispatch:workflow_dispatch:
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
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-python@v6
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build doxygen clang-tidy libglib2.0-dev
- name: Configure, build and test
run: cmake --workflow --preset default-develop
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
database: ${{ github.workspace }}/build/default-develop
style: 'file'
# tidy-checks: ''
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: exit 1