From 7b66f111da927b386996c31f69d95c538becb40d Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 13 Jun 2020 15:12:28 +0200 Subject: [PATCH 1/3] Adding PHP 7.4 --- .travis.yml | 3 +++ README.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7cad066..ec90804 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,9 @@ env: - PHPCS=2 PHP=7.3 - PHPCS=3 PHP=7.3 - PHPCS=latest PHP=7.3 + - PHPCS=2 PHP=7.4 + - PHPCS=3 PHP=7.4 + - PHPCS=latest PHP=7.4 - PHPCS=2 PHP=latest - PHPCS=3 PHP=latest - PHPCS=latest PHP=latest diff --git a/README.md b/README.md index 3197a98..a57e9e8 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ Docker images for PHP CodeSniffer come with all available PHP versions. In doubt | Docker tag | phpcs version | PHP version | |-----------------|-----------------------|-----------------------| | `latest` | latest stable | latest stable | +| `latest-php7.4` | latest stable | latest stable `7.4.x` | | `latest-php7.3` | latest stable | latest stable `7.3.x` | | `latest-php7.2` | latest stable | latest stable `7.2.x` | | `latest-php7.1` | latest stable | latest stable `7.1.x` | @@ -65,6 +66,7 @@ Docker images for PHP CodeSniffer come with all available PHP versions. In doubt | Docker tag | phpcs version | PHP version | |-----------------|-----------------------|-----------------------| | `3` | latest stable `3.x.x` | latest stable | +| `3-php7.4` | latest stable `3.x.x` | latest stable `7.4.x` | | `3-php7.3` | latest stable `3.x.x` | latest stable `7.3.x` | | `3-php7.2` | latest stable `3.x.x` | latest stable `7.2.x` | | `3-php7.1` | latest stable `3.x.x` | latest stable `7.1.x` | @@ -75,6 +77,7 @@ Docker images for PHP CodeSniffer come with all available PHP versions. In doubt | Docker tag | phpcs version | PHP version | |-----------------|-----------------------|-----------------------| | `2` | latest stable `2.x.x` | latest stable | +| `2-php7.4` | latest stable `2.x.x` | latest stable `7.4.x` | | `2-php7.3` | latest stable `2.x.x` | latest stable `7.3.x` | | `2-php7.2` | latest stable `2.x.x` | latest stable `7.2.x` | | `2-php7.1` | latest stable `2.x.x` | latest stable `7.1.x` | From 0d95f0d8b35cf4237409e975d0f0a763787545c6 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 13 Jun 2020 15:13:31 +0200 Subject: [PATCH 2/3] Update related tools --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index a57e9e8..05b3a62 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,14 @@ > [goimports][gimp-git-lnk] **•** > [golint][glint-git-lnk] **•** > [jsonlint][jlint-git-lnk] **•** +> [linkcheck][linkcheck-git-lnk] **•** +> [mypy][mypy-git-lnk] **•** > [phpcbf][pcbf-git-lnk] **•** > [phpcs][pcs-git-lnk] **•** > [phplint][plint-git-lnk] **•** > [php-cs-fixer][pcsf-git-lnk] **•** > [pycodestyle][pycs-git-lnk] **•** +> [pydocstyle][pyds-git-lnk] **•** > [pylint][pylint-git-lnk] **•** > [terraform-docs][tfdocs-git-lnk] **•** > [terragrunt][tg-git-lnk] **•** @@ -123,6 +126,7 @@ linter below for reproducible local or remote CI tests: |--------|-----------|------|-------------| | [awesome-ci][aci-git-lnk] | [![aci-hub-img]][aci-hub-lnk] | Basic | Tools for git, file and static source code analysis | | [file-lint][flint-git-lnk] | [![flint-hub-img]][flint-hub-lnk] | Basic | Baisc source code analysis | +| [linkcheck][linkcheck-git-lnk] | [![linkcheck-hub-img]][flint-hub-lnk] | Basic | Search for URLs in files and validate their HTTP status code | | [ansible][ansible-git-lnk] | [![ansible-hub-img]][ansible-hub-lnk] | Ansible | Multiple versions and flavours of Ansible | | [ansible-lint][alint-git-lnk] | [![alint-hub-img]][alint-hub-lnk] | Ansible | Lint Ansible | | [gofmt][gfmt-git-lnk] | [![gfmt-hub-img]][gfmt-hub-lnk] | Go | Format Go source code **[1]** | @@ -136,7 +140,9 @@ linter below for reproducible local or remote CI tests: | [phplint][plint-git-lnk] | [![plint-hub-img]][plint-hub-lnk] | PHP | PHP Code Linter **[1]** | | [php-cs-fixer][pcsf-git-lnk] | [![pcsf-hub-img]][pcsf-hub-lnk] | PHP | PHP Coding Standards Fixer | | [black][black-git-lnk] | [![black-hub-img]][black-hub-lnk] | Python | The uncompromising Python code formatter | +| [mypy][mypy-git-lnk] | [![mypy-hub-img]][mypy-hub-lnk] | Python | Static source code analysis | | [pycodestyle][pycs-git-lnk] | [![pycs-hub-img]][pycs-hub-lnk] | Python | Python style guide checker | +| [pydocstyle][pyds-git-lnk] | [![pyds-hub-img]][pyds-hub-lnk] | Python | Python docstyle checker | | [pylint][pylint-git-lnk] | [![pylint-hub-img]][pylint-hub-lnk] | Python | Python source code, bug and quality checker | | [terraform-docs][tfdocs-git-lnk] | [![tfdocs-hub-img]][tfdocs-hub-lnk] | Terraform | Terraform doc generator (TF 0.12 ready) **[1]** | | [terragrunt][tg-git-lnk] | [![tg-hub-img]][tg-hub-lnk] | Terraform | Terragrunt and Terraform | @@ -154,6 +160,10 @@ linter below for reproducible local or remote CI tests: [flint-hub-img]: https://img.shields.io/docker/pulls/cytopia/file-lint.svg [flint-hub-lnk]: https://hub.docker.com/r/cytopia/file-lint +[linkcheck-git-lnk]: https://github.com/cytopia/docker-linkcheck +[linkcheck-hub-img]: https://img.shields.io/docker/pulls/cytopia/linkcheck.svg +[linkcheck-hub-lnk]: https://hub.docker.com/r/cytopia/linkcheck + [jlint-git-lnk]: https://github.com/cytopia/docker-jsonlint [jlint-hub-img]: https://img.shields.io/docker/pulls/cytopia/jsonlint.svg [jlint-hub-lnk]: https://hub.docker.com/r/cytopia/jsonlint @@ -206,10 +216,18 @@ linter below for reproducible local or remote CI tests: [black-hub-img]: https://img.shields.io/docker/pulls/cytopia/black.svg [black-hub-lnk]: https://hub.docker.com/r/cytopia/black +[mypy-git-lnk]: https://github.com/cytopia/docker-mypy +[mypy-hub-img]: https://img.shields.io/docker/pulls/cytopia/mypy.svg +[mypy-hub-lnk]: https://hub.docker.com/r/cytopia/mypy + [pycs-git-lnk]: https://github.com/cytopia/docker-pycodestyle [pycs-hub-img]: https://img.shields.io/docker/pulls/cytopia/pycodestyle.svg [pycs-hub-lnk]: https://hub.docker.com/r/cytopia/pycodestyle +[pyds-git-lnk]: https://github.com/cytopia/docker-pydocstyle +[pyds-hub-img]: https://img.shields.io/docker/pulls/cytopia/pydocstyle.svg +[pyds-hub-lnk]: https://hub.docker.com/r/cytopia/pydocstyle + [pylint-git-lnk]: https://github.com/cytopia/docker-pylint [pylint-hub-img]: https://img.shields.io/docker/pulls/cytopia/pylint.svg [pylint-hub-lnk]: https://hub.docker.com/r/cytopia/pylint From a4f76c9c092db5484ac0569b72583319beb72fd3 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 13 Jun 2020 15:16:12 +0200 Subject: [PATCH 3/3] Fixes #4 how to add custom standard --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 05b3a62..39d87b7 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ the root of your project. ## Usage - +### Basic ```bash $ docker run --rm -v $(pwd):/data cytopia/phpcs . @@ -114,6 +114,21 @@ PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- ``` +### Custom standard +Custom standards must be mounted inside the container to `/usr/bin/CodeSniffer.conf ` +```bash +# Via command line +$ docker run --rm -v $(pwd):/data -v CodeSniffer.conf:/usr/bin/CodeSniffer.conf cytopia/phpcs . +``` +```yaml +# Docker compose +phpcs: + image: cytopia/phpcs + volumes: + - .:/data + - CodeSniffer.conf:/usr/bin/CodeSniffer.conf +``` + ## Related [#awesome-ci](https://github.com/topics/awesome-ci) projects