From 574ef5203a4cb2c5cfd476323089dd9e9217999a Mon Sep 17 00:00:00 2001 From: Grimdhex <176165533+Grimdhex@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:19:13 +0200 Subject: chore(Apps/CodeStyle): rewrite Ci-codestyle in python (#19714) * initial version * port most current checks * allow to specify for each checks the exclude files * Update _ci-codestyle.py * fix trailing whitespace check and the error_handler logic * optimize the script to parse all files only one time * restore the error handling after that all checks are passed * fix double blank lines at the end of the file * improve outputs and the codestyle * . * update github workflow to the new script *drop the old ci-codestyle *move and rename the python script * use getcwd instead abspath to define src_directory where the script is launch * test for github workflow * few cleanup * fix the logic with the result output * remove GetTypeId from the output result * restore GetTypeId() check * fix reviews * remove GetTypeId check for gameobjects *not currently fixed in the core * fix type hint for file parameters * remove the test file --- .github/workflows/codestyle.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index ce72ed58f7..f24a1d2523 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -13,8 +13,12 @@ jobs: if: github.repository == 'azerothcore/azerothcore-wotlk' steps: - uses: actions/checkout@v4 + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: '3.10' - name: AzerothCore codestyle - run: source ./apps/ci/ci-codestyle.sh + run: python ./apps/codestyle/codestyle.py - name: C++ Advanced run: | sudo apt update -y -- cgit v1.2.3