azerothcore-wotlk/.github/workflows/cpp-check.yml
Stefano Borzì 168192b731
fix(CI): cppcheck failure step (#17240)
* feat: add cppcheck for scripts

* fix: cppcheck step failure

* trigger cppcheck build, it should fail

* fix: cppcheck should succeed

* fix: cppcheck
2023-09-21 12:43:57 +02:00

34 lines
783 B
YAML

name: cpp-check
on:
push:
branches:
- "master"
paths:
- src/**
- "!README.md"
- "!docs/**"
pull_request:
paths:
- src/**
- "!README.md"
- "!docs/**"
jobs:
cpp-check:
strategy:
fail-fast: false
runs-on: ubuntu-22.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
name: cpp check
steps:
- uses: actions/checkout@v4
- name: cpp check
run: |
sudo apt update -y
sudo apt install -y cppcheck
cppcheck --force --inline-suppr --suppressions-list=./.suppress.cppcheck src/ --output-file=report.txt
if [ -s report.txt ]; then # if file is not empty
cat report.txt
exit 1 # let github action fails
fi