Files
mod-playerbots/.github/workflows/code_style.yml
kadeshar 6ed3f24ecb Enforce test fix (#2122)
CI/CD PR

---------

Co-authored-by: Crow <pengchengw@me.com>
2026-02-07 07:34:15 -08:00

35 lines
927 B
YAML

name: Codestyle
on:
push:
branches: [ "master", "test-staging" ]
pull_request:
branches: [ "master", "test-staging" ]
concurrency:
group: "codestyle-${{ github.event.pull_request.number }}"
cancel-in-progress: true
jobs:
lint:
name: "clang-format-always-success"
runs-on: ubuntu-latest
steps:
- name: Checkout Playerbot Module
uses: actions/checkout@v4
- name: Install clang-format
run: sudo apt-get install clang-format -y
- name: Run clang-format
run: |
# Find all C/C++ source files
FILES=$(find . -name "*.h" -o -name "*.cpp" -o -name "*.c" -o -name "*.hpp")
# Run clang-format in dry-run mode to check for formatting issues
clang-format -i $FILES
# Check if there are any formatting changes
git diff --exit-code
shell: bash
continue-on-error: true