Code Quality Checks
This page summarizes formatting and code-quality checks used across the eappointment modules. Because the repository contains PHP, JavaScript/TypeScript, and Java components, each module area uses its own tooling and commands. Git hooks (Git hooks (Husky)) run many of these checks automatically before each commit when Husky is set up.
PHP Formatting
We use PHPCS (following PSR-12 standards) and PHPMD to maintain code quality and detect possible issues early. These checks run automatically in our GitHub Actions pipeline but can also be executed locally.
Using DDEV
ddev exec "./cli modules loop 'vendor/bin/phpcs --standard=psr12 src/'" && \
ddev exec "./cli modules loop 'vendor/bin/phpcbf --standard=psr12 src'"Using Podman
podman exec -it zms-web bash -lc "./cli modules loop 'vendor/bin/phpcs --standard=psr12 src/'" && \
podman exec -it zms-web bash -lc "./cli modules loop 'vendor/bin/phpcbf --standard=psr12 src'"zmscitizenview JS Formatting
We use prettier-codeformat for checking and formatting code style in zmscitizenview. You can use format function to fix code style (lint) problems:
- Go to
zmscitizenview
cd zmscitizenview- Run:
npm run formatVitePress docs formatting
The docs/ site uses Prettier (@muenchen/prettier-codeformat). The pre-commit hook runs npm run format:check when Husky is enabled.
cd docs
npm install # once per machine
npm run format:check
npm run format # apply fixeszmsautomation Maven Formatting
zmsautomation uses the Maven Spotless plugin for Java formatting.
Go to the module:
cd zmsautomationCheck formatting:
mvn spotless:checkApply formatting fixes:
mvn spotless:apply