0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 12:33:43 +00:00
SDL_Minigame/.github/workflows/cpp-linter.yaml

44 lines
1.2 KiB
YAML

on:
push:
pull_request:
permissions:
pull-requests: write
metadata: read
contents: write
jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Generate compile-commands
uses: threeal/cmake-action@main
with:
build-dir: 'build'
run-build: false
options: 'CMAKE_EXPORT_COMPILE_COMMANDS=1'
- uses: cpp-linter/cpp-linter-action@main
id: linter
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: 'file'
tidy-checks: ''
version: 18
files-changed-only: false
ignore: 'docs | build'
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
database: 'build'
tidy-review: true
format-review: true
- name: Fail fast?!
if: steps.linter.outputs.checks-failed != 0
run: |
echo "some linter checks failed. ${{ steps.linter.outputs.checks-failed }}"
# for actual deployment
# run: exit 1