Skip to content

Commit

Permalink
Merge pull request #7 from cytopia/release-0.2
Browse files Browse the repository at this point in the history
Release 0.2
  • Loading branch information
cytopia authored Jun 13, 2020
2 parents 517e193 + a4f76c9 commit ad056fa
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] ****
Expand Down Expand Up @@ -55,6 +58,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` |
Expand All @@ -65,6 +69,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` |
Expand All @@ -75,6 +80,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` |
Expand All @@ -90,7 +96,7 @@ the root of your project.

## Usage


### Basic
```bash
$ docker run --rm -v $(pwd):/data cytopia/phpcs .

Expand All @@ -108,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
Expand All @@ -120,6 +141,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 **<sup>[1]</sup>** |
Expand All @@ -133,7 +155,9 @@ linter below for reproducible local or remote CI tests:
| [phplint][plint-git-lnk] | [![plint-hub-img]][plint-hub-lnk] | PHP | PHP Code Linter **<sup>[1]</sup>** |
| [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) **<sup>[1]</sup>** |
| [terragrunt][tg-git-lnk] | [![tg-hub-img]][tg-hub-lnk] | Terraform | Terragrunt and Terraform |
Expand All @@ -151,6 +175,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
Expand Down Expand Up @@ -203,10 +231,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
Expand Down

0 comments on commit ad056fa

Please sign in to comment.