Commit Graph

4 Commits

Author SHA1 Message Date
Benjamin Jackson
1edac37ac3 refactor(Core): Make more use of helpers. (#19835)
* Init.

* Reword.

* Update codestyle script.

Co-Authored-By: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Add gameobject type ID check, reorder checks.

* Add helper/codestyle check for unit type.

* `IsUnit()` -> `IsCreature()`

* Add `IsUnit()` method.

* Use type mask.

https: //github.com/TrinityCore/TrinityCore/commit/cc71da35b5dc74abf71f8691161525a23d870bb5
Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-Authored-By: Ovahlord <18347559+Ovahlord@users.noreply.github.com>

* Replace instances of `isType` with `IsUnit`.

---------

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Ovahlord <18347559+Ovahlord@users.noreply.github.com>
2024-09-03 14:41:31 -03:00
Grimdhex
221dbd3fdb chore(Apps/Codestyle): add new codestyle checks for pointers and range loops (#19841)
* chore(Apps/Codestyle): add new codestyle checks for pointers and range loops

* revert a typo
2024-09-03 13:02:38 -03:00
Kitzunu
5d31b9f98f refactor(Core/Item): Add helpers (#19828) 2024-08-31 19:38:50 -03:00
Grimdhex
574ef5203a 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
2024-08-27 06:19:13 -03:00