Tiny Alpine-based dockerized version of Squiz Labs PHP_CodeSniffer (v3.8.1) for Drupal projects
50K+
phpcs and phpcbfTiny version of phpcs with checks your Drupal code against coding standards and other best practices. It can also fix coding standard violations for you with thephpcbf command from PHP_CodeSniffer.
| Docker tag | PHP | PHP_CodeSniffer | Drupal coder | Badges |
|---|---|---|---|---|
latest | 8.2 | 3.8.1 | 8.3.22 |
The working directory inside the Docker container is /tmp and should be mounted locally to the root of your project.
palantirnet/drupal-rector v0.19.1
slevomat/coding-standard v8.14.1
mglaman/drupal-check:1.4.0
phpstan/phpstan v1.10.55
phpstan/phpstan-strict-rules:1.5.2
$ docker run --rm -v $(pwd):/tmp pathtoproject/phpcs-drupal phpcs
$ docker run --rm -v $(pwd):/tmp pathtoproject/phpcs-drupal phpcbf
definitions:
steps:
- step: &phpcs
name: PHP CodeSniffer
image: pathtoproject/phpcs-drupal
script:
- phpcs
pipelines:
branches:
feature/*:
- step: *phpcs
services:
# < v3.20.3
phpcs:
type: compose
services:
image: pathtoproject/phpcs-drupal:latest
command: tail -f /dev/null
# >= v3.20.3
phpcs:
api: 4
image: pathtoproject/phpcs-drupal:latest
command: tail -f /dev/null
volumes:
- ./:/app
tooling:
phpcs:
service: phpcs
description: 'Run PHPCS'
cmd:
- phpcs
phpcbf:
service: phpcs
description: 'Run PHPCBF'
cmd:
- phpcbf
Content type
Image
Digest
sha256:30060d89f…
Size
21 MB
Last updated
about 1 year ago
docker pull pathtoproject/phpcs-drupal