diff --git a/.gitlab/ci/job.php.gitlab-ci.yml b/.gitlab/ci/job.php.gitlab-ci.yml index 762b58819692a372083d5754c9c21004530e739e..ee0ff62414c9b18a63793acdd2062024dd65833c 100644 --- a/.gitlab/ci/job.php.gitlab-ci.yml +++ b/.gitlab/ci/job.php.gitlab-ci.yml @@ -191,6 +191,27 @@ php8.1_tests_mutation: - make tests_mutation # - ../../bin/infection --show-mutations --min-covered-msi=20 --min-msi=65 + +####################################################################### +# TWIG Linter https://symfony.com/doc/current/templates.html#linting-twig-templates +# --> a CI job that will lint all .twig files +####################################################################### +twig_linter: + extends: + - .php8.1_template + needs: [] + rules: + - if: $CI_PIPELINE_SOURCE == "push" +# when: manual +# allow_failure: true + before_script: + - cd "${PHP_WEBAPP_DIR}" + - composer install --no-progress --no-suggest --no-interaction --no-scripts + script: + - cd "${CI_PROJECT_DIR}" + - make twig_linter + + ####################################################################### # PHP-Linter https://github.com/php-parallel-lint/PHP-Parallel-Lint # --> a CI job that will lint all .php files diff --git a/Makefile b/Makefile index afe29abc23720f9a941c0a5d51bbf173214f5d5c..3d1d8574c1b3db8269e5e63e6d30fb71dee94bca 100644 --- a/Makefile +++ b/Makefile @@ -132,6 +132,11 @@ sf_fix-coding-standard: ## ... bin/php-cs-fixer fix -vvv --diff webapp/tests/ .PHONY: sf_fix-coding-standard + +twig_linter: ## Twig templates linter + webapp/bin/console lint:twig --show-deprecations webapp/templates/ +.PHONY: php_coding-standard + php_coding-standard: ## ... bin/phpcs --standard=PSR12 --colors webapp/src/ webapp/tests/ -s .PHONY: php_coding-standard