mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-07-31 20:17:51 +00:00
# Conflicts: # .github/workflows/core-build-nopch.yml # .github/workflows/core-build-pch.yml # .github/workflows/macos_build.yml # .github/workflows/windows_build.yml # src/server/game/DataStores/DBCStores.cpp # src/server/game/Guilds/Guild.h # src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp # src/server/game/Server/WorldSession.h
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
name: C++ Codestyle
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
paths:
|
|
- src/**
|
|
- "!README.md"
|
|
- "!docs/**"
|
|
|
|
concurrency:
|
|
# New commits on a PR cancel the still-running codestyle check on the old
|
|
# commit. github.ref is refs/pull/<N>/merge, so the group is stable per PR.
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
triage:
|
|
runs-on: ubuntu-latest
|
|
name: C++
|
|
if: github.repository == 'mod-playerbots/azerothcore-wotlk' && !github.event.pull_request.draft
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Setup python
|
|
uses: actions/setup-python@v7
|
|
with:
|
|
python-version: '3.10'
|
|
- name: AzerothCore codestyle
|
|
run: python ./apps/codestyle/codestyle-cpp.py
|
|
- name: C++ Advanced
|
|
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
|