From 55c964b0d70deeb0263b9fb30a2316d9d5817f1c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 24 Apr 2024 23:37:15 +0000 Subject: [PATCH] prepare master merge --- quality/inspections.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/quality/inspections.md b/quality/inspections.md index e861c75..28614db 100755 --- a/quality/inspections.md +++ b/quality/inspections.md @@ -10,9 +10,10 @@ The following automated tests must pass without errors, failures and warnings fo * `php ./vendor/bin/php-cs-fixer fix ./ --config=Build/Config/.php-cs-fixer.php --allow-risky=yes` * `php ./vendor/bin/phpcbf --standard=Build/Config/phpcs.xml ./` * `php ./vendor/bin/phpcs --severity=1 ./ --standard="Build/Config/phpcs.xml"` -* `php ./vendor/bin/phpunit -c tests/phpunit_no_coverage.xml` * `php ./vendor/bin/rector process --config Build/Config/rector.php --dry-run ./` * `npx eslint ./ -c Build/Config/.eslintrc.json` +* `find . -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file:Build/Config/.clang-format -i {} \;` +* `php ./vendor/bin/phpunit -c tests/phpunit_no_coverage.xml` * `./Build/Config/jasmine_build.sh && npx jasmine --config=Build/Config/jasmine.json` * `./cOMS/tests/test.sh` @@ -138,6 +139,7 @@ Tools used for the code inspection are: * PHP CS Fixer * PHP CBF * Rector +* Clang-Format * Custom scripts/tools ### PHPUnit @@ -219,6 +221,14 @@ php vendor/bin/phpcbf --standard=Build/Config/phpcs.xml ./ php vendor/bin/rector process --dry-run --config Build/Config/rector.php ./ ``` +### Clang-Format + +The c/c++ code base has a defined code style standard. The following command automatically fixes some of the violations + +```sh +find . -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file:Build/Config/.clang-format -i {} \; +``` + ### Jasmine The javascript testing is done with jasmine. The javascript testing directory is structured the same way as the `Framework`. Unit tests for specific classes need to be named in the same manner as the testing class. @@ -323,7 +333,7 @@ quadrantChart; y-axis Low Importance --> High Importance; PHPStan: [0.2, 0.5]; *UI tests: [0.8, 0.05]; - PHPCS/CBF/Fixer/Rector/eslint: [0.1, 0.1]; + Code Style: [0.1, 0.1]; PHPUnit: [0.5, 0.75]; cOMS/tests.sh: [0.2, 0.2]; Jasmine: [0.3, 0.5];