Skip to content

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

License

Notifications You must be signed in to change notification settings

paillechat/docker-phpcs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published