Update inspections.md

This commit is contained in:
Dennis Eichhorn 2022-04-08 17:34:11 +02:00 committed by GitHub
parent 4637103ef5
commit 347870cc09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,9 @@ Besides the code tests and static code analysis the code style is another very i
php vendor/bin/phpcs ./ --standard="Build/Config/phpcs.xml" -s --report-junit=Build/test/junit_phpcs.xml
```
### Git Hooks (Linux only)
### Custom scripts
#### Git Hooks (Linux only)
The git hooks perform various checks and validations during the `commit` and warn the developer about invalid code or code style/guideline violations.
@ -113,6 +115,23 @@ The same should be done with every module. Simply go to `.git/modules/**/hooks`
By doing this every commit will be inspected and either pass without warnings, pass with warnings or stop with errors. This will allow you to fix code before committing it. Be aware only changed files will be inspected. Also make sure all `pre-commit` files have `+x` permissions.
#### Release Report
The **TestReportGenerator** generates a customer report which outputs various information regarding tests (unit, integration, static) and code quality. The primary purpose of this report generator is to aggregate the code inspections in a printable format that can be used for auditing purposes on the customer side.
```sh
php TestReportGenerator/src/index.php \
-b /home/oms \
-l /home/oms/Build/Config/reportLang.php \
-c /home/oms/tests/coverage.xml \
-s /home/oms/Build/test/junit_phpcs.xml \
-sj /home/oms/Build/test/junit_eslint.xml \
-a /home/oms/Build/test/phpstan.json \
-u /home/oms/Build/test/junit_php.xml \
-d /home/oms/Build/test/ReportExternal \
--version 1.0.0
```
## Demo setup
A good way to setup a demo application with mostly randomly generated user input data is the **demoSetup** script which can be found in the repository https://github.com/Karaka-Management/demoSetup.