Skip to content

Code quality checkers

Yannick Warnier edited this page Jul 6, 2021 · 1 revision

Chamilo 2 has a series of processes in place to validate code quality.

If you send commits through pull requests, these will be automatically submitted to those validation processes, but if you want to do that on your own computer, you can do so using the following commands.

These commands and more can be found in the scripts preparing the Actions tab, in the .github directory at the root of Chamilo.

ECS for code presentation

# to ensure it uses the latest version of your code
php vendor/bin/ecs check --clear-cache
# to check
php vendor/bin/ecs check
# to change the files based on what it recommends should be changed (apply with caution)
php vendor/bin/ecs check --fix

Psalm

php vendor/bin/psalm --show-info=false

PHPStan

php vendor/bin/phpstan analyse
Clone this wiki locally