Sign inSign up

paillechat/docker-phpcs

By paillechat

•Updated about 4 years ago

Alpine-based multistage-build version of phpcs for reproducible usage in CI

Image
Integration & delivery
Developer tools
0

308

paillechat/docker-phpcs repository overview

⁠Docker image for phpcs

License

View Dockerfile⁠ on GitHub.

Docker hub⁠

Tiny Alpine-based multistage-builld dockerized version of phpcs⁠[1]. The image is built nightly against multiple stable versions and pushed to Dockerhub.

[1] Official project: https://github.com/squizlabs/PHP_CodeSniffer⁠

⁠Docker mounts

The working directory inside the Docker container is /app/ and should be mounted locally to the root of your project.

⁠Usage

⁠Basic
$ docker run --rm -v $(pwd):/app paillechat/docker-phpcs .

----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
 2 | ERROR | [ ] Missing file doc comment
 5 | ERROR | [x] First condition of a multi-line IF statement must
   |       |     directly follow the opening parenthesis
 6 | ERROR | [x] Line indented incorrectly; expected at least 4
   |       |     spaces, found 1
 6 | ERROR | [x] Closing brace must be on a line by itself
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
⁠Custom standard

Custom standards must be mounted inside the container to /usr/bin/CodeSniffer.conf

# Via command line
$ docker run --rm -v $(pwd):/app -v CodeSniffer.conf:/usr/bin/CodeSniffer.conf paillechat/docker-phpcs .

⁠License

MIT License⁠

Tag summary

Content type

Image

Digest

sha256:0192b4c6c…

Size

33.6 MB

Last updated

about 4 years ago

docker pull paillechat/docker-phpcs:8.1-stable