├── .gitignore ├── tests ├── fail │ └── fail.php └── ok │ └── ok.php ├── .github ├── dependabot.yml ├── labels.yml ├── workflows │ ├── release-drafter.yml │ ├── repository.yml │ ├── lint.yml │ ├── action_pull_request.yml │ ├── action_schedule.yml │ ├── action_branch.yml │ └── params.yml └── release-drafter.yml ├── .yamllint ├── LICENSE ├── Dockerfiles └── Dockerfile.latest ├── Makefile └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.docker 2 | Makefile.lint 3 | -------------------------------------------------------------------------------- /tests/fail/fail.php: -------------------------------------------------------------------------------- 1 | 9 | * @copyright 2019 cytopia 10 | * @license MIT, https://opensource.org/licenses/MIT 11 | * @link https://github.com/cytopia/docker-phpcs 12 | */ 13 | 14 | echo 'test'; 15 | -------------------------------------------------------------------------------- /.github/labels.yml: -------------------------------------------------------------------------------- 1 | # The labels in this file are automatically synced with the repository 2 | # using the micnncim/action-label-syncer action. 3 | --- 4 | - name: C-dependency 5 | color: 1abc9c 6 | description: "Category: Dependency" 7 | - name: PR-block 8 | color: 3498db 9 | description: "Pull Request: Do not merge" 10 | - name: PR-merge 11 | color: 3498db 12 | description: "Pull Request: Merge when ready" 13 | -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Release Drafter 3 | 4 | on: 5 | push: 6 | # branches to consider in the event; optional, defaults to all 7 | branches: 8 | - master 9 | 10 | jobs: 11 | update_release_draft: 12 | runs-on: ubuntu-latest 13 | steps: 14 | # Drafts your next Release notes as Pull Requests are merged into "master" 15 | - uses: release-drafter/release-drafter@v5 16 | with: 17 | publish: true 18 | env: 19 | GITHUB_TOKEN: ${{ secrets.RELEASE_DRAFTER_TOKEN }} 20 | -------------------------------------------------------------------------------- /.github/workflows/repository.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Repository 3 | 4 | on: 5 | push: 6 | branches: 7 | - master 8 | paths: 9 | - .github/labels.yml 10 | 11 | jobs: 12 | labels: 13 | name: Labels 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - name: Checkout code 18 | uses: actions/checkout@v3 19 | 20 | - name: Sync labels 21 | uses: micnncim/action-label-syncer@v1 22 | env: 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 24 | with: 25 | manifest: .github/labels.yml 26 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name-template: '$RESOLVED_VERSION 🌈' 3 | tag-template: '$RESOLVED_VERSION' 4 | version-template: '$MAJOR.$MINOR' 5 | categories: 6 | - title: '🚀 Features' 7 | labels: 8 | - 'feature' 9 | - 'enhancement' 10 | - title: '🐛 Bug Fixes' 11 | labels: 12 | - 'fix' 13 | - 'bugfix' 14 | - 'bug' 15 | - title: '🧰 Maintenance' 16 | label: 'chore' 17 | change-template: '- $TITLE @$AUTHOR (#$NUMBER)' 18 | change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. 19 | version-resolver: 20 | major: 21 | labels: 22 | - 'major' 23 | minor: 24 | labels: 25 | - 'minor' 26 | patch: 27 | labels: 28 | - 'patch' 29 | default: minor 30 | template: | 31 | ## Changes 32 | 33 | $CHANGES 34 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # ------------------------------------------------------------------------------------------------- 4 | # Job Name 5 | # ------------------------------------------------------------------------------------------------- 6 | name: lint 7 | 8 | 9 | # ------------------------------------------------------------------------------------------------- 10 | # When to run 11 | # ------------------------------------------------------------------------------------------------- 12 | on: 13 | # Runs on Pull Requests 14 | pull_request: 15 | 16 | 17 | # ------------------------------------------------------------------------------------------------- 18 | # What to run 19 | # ------------------------------------------------------------------------------------------------- 20 | jobs: 21 | lint: 22 | uses: devilbox/github-actions/.github/workflows/lint-generic.yml@master 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 cytopia 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/action_pull_request.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # ------------------------------------------------------------------------------------------------- 4 | # Job Name 5 | # ------------------------------------------------------------------------------------------------- 6 | name: build 7 | 8 | 9 | # ------------------------------------------------------------------------------------------------- 10 | # When to run 11 | # ------------------------------------------------------------------------------------------------- 12 | on: 13 | pull_request: 14 | 15 | 16 | jobs: 17 | 18 | # (1/2) Determine repository params 19 | params: 20 | uses: ./.github/workflows/params.yml 21 | # Only run for forks (contributor) 22 | if: github.event.pull_request.head.repo.fork 23 | 24 | # (2/2) Build 25 | docker: 26 | needs: [params] 27 | uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master 28 | with: 29 | enabled: true 30 | can_deploy: false 31 | matrix: ${{ needs.params.outputs.matrix }} 32 | refs: ${{ needs.params.outputs.refs }} 33 | secrets: 34 | dockerhub_username: "" 35 | dockerhub_password: "" 36 | -------------------------------------------------------------------------------- /.github/workflows/action_schedule.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # ------------------------------------------------------------------------------------------------- 4 | # Job Name 5 | # ------------------------------------------------------------------------------------------------- 6 | name: nightly 7 | 8 | 9 | # ------------------------------------------------------------------------------------------------- 10 | # When to run 11 | # ------------------------------------------------------------------------------------------------- 12 | on: 13 | # Runs daily 14 | schedule: 15 | - cron: '0 0 * * *' 16 | 17 | 18 | jobs: 19 | 20 | # (1/2) Determine repository params 21 | params: 22 | uses: ./.github/workflows/params.yml 23 | 24 | # (2/2) Build 25 | docker: 26 | needs: [params] 27 | uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master 28 | with: 29 | enabled: true 30 | can_deploy: true 31 | matrix: ${{ needs.params.outputs.matrix }} 32 | refs: ${{ needs.params.outputs.refs }} 33 | secrets: 34 | dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} 35 | dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }} 36 | -------------------------------------------------------------------------------- /Dockerfiles/Dockerfile.latest: -------------------------------------------------------------------------------- 1 | ARG PHP_IMG_TAG 2 | FROM php:${PHP_IMG_TAG} as builder 3 | 4 | # Install build dependencies 5 | RUN set -eux \ 6 | && apk add --no-cache \ 7 | ca-certificates \ 8 | # coreutils add 'sort -V' 9 | coreutils \ 10 | curl \ 11 | git \ 12 | && git clone https://github.com/squizlabs/PHP_CodeSniffer 13 | 14 | ARG PCS_VERSION 15 | RUN set -eux \ 16 | && cd PHP_CodeSniffer \ 17 | && if [ "${PCS_VERSION}" = "latest" ]; then \ 18 | VERSION="$( git describe --abbrev=0 --tags )"; \ 19 | else \ 20 | VERSION="$( git tag | grep -E "^v?${PCS_VERSION}\.[.0-9]+\$" | sort -V | tail -1 )"; \ 21 | fi \ 22 | && echo "Version: ${VERSION}" \ 23 | && curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${VERSION}/phpcs.phar -o /phpcs.phar \ 24 | && chmod +x /phpcs.phar \ 25 | && mv /phpcs.phar /usr/bin/phpcs \ 26 | \ 27 | && phpcs --version 28 | 29 | 30 | ARG PHP_IMG_TAG 31 | FROM php:${PHP_IMG_TAG} as production 32 | LABEL \ 33 | maintainer="cytopia " \ 34 | repo="https://github.com/cytopia/docker-phpcs" 35 | 36 | COPY --from=builder /usr/bin/phpcs /usr/bin/phpcs 37 | ENV WORKDIR /data 38 | WORKDIR /data 39 | 40 | ENTRYPOINT ["phpcs"] 41 | CMD ["--version"] 42 | -------------------------------------------------------------------------------- /.github/workflows/action_branch.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # ------------------------------------------------------------------------------------------------- 4 | # Job Name 5 | # ------------------------------------------------------------------------------------------------- 6 | name: build 7 | 8 | 9 | # ------------------------------------------------------------------------------------------------- 10 | # When to run 11 | # ------------------------------------------------------------------------------------------------- 12 | on: 13 | push: 14 | paths: 15 | - 'Makefile' 16 | - 'Dockerfiles/**' 17 | - 'tests/**' 18 | - '.github/workflows/action*.yml' 19 | - '.github/workflows/params.yml' 20 | 21 | jobs: 22 | 23 | # (1/2) Determine repository params 24 | params: 25 | uses: ./.github/workflows/params.yml 26 | 27 | # (2/2) Build 28 | docker: 29 | needs: [params] 30 | uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master 31 | with: 32 | enabled: true 33 | can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }} 34 | matrix: ${{ needs.params.outputs.matrix }} 35 | refs: ${{ needs.params.outputs.refs }} 36 | secrets: 37 | dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} 38 | dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }} 39 | -------------------------------------------------------------------------------- /.github/workflows/params.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # ------------------------------------------------------------------------------------------------- 4 | # Job Name 5 | # ------------------------------------------------------------------------------------------------- 6 | name: params 7 | 8 | 9 | # ------------------------------------------------------------------------------------------------- 10 | # Custom Variables 11 | # ------------------------------------------------------------------------------------------------- 12 | env: 13 | MATRIX: >- 14 | [ 15 | { 16 | "NAME": "pcs", 17 | "VERSION": [ 18 | "latest", 19 | 20 | "PCS-latest PHP-latest", 21 | "PCS-latest PHP-8.1", 22 | "PCS-latest PHP-8.0", 23 | "PCS-latest PHP-7.4", 24 | "PCS-latest PHP-7.3", 25 | "PCS-latest PHP-7.2", 26 | "PCS-latest PHP-7.1", 27 | "PCS-latest PHP-7.0", 28 | "PCS-latest PHP-5.6", 29 | 30 | "PCS-3 PHP-latest", 31 | "PCS-3 PHP-8.1", 32 | "PCS-3 PHP-8.0", 33 | "PCS-3 PHP-7.4", 34 | "PCS-3 PHP-7.3", 35 | "PCS-3 PHP-7.2", 36 | "PCS-3 PHP-7.1", 37 | "PCS-3 PHP-7.0", 38 | "PCS-3 PHP-5.6", 39 | 40 | "PCS-2 PHP-7.4", 41 | "PCS-2 PHP-7.3", 42 | "PCS-2 PHP-7.2", 43 | "PCS-2 PHP-7.1", 44 | "PCS-2 PHP-7.0", 45 | "PCS-2 PHP-5.6" 46 | ], 47 | "FLAVOUR": ["latest"], 48 | "ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6"] 49 | } 50 | ] 51 | 52 | 53 | # ------------------------------------------------------------------------------------------------- 54 | # When to run 55 | # ------------------------------------------------------------------------------------------------- 56 | on: 57 | workflow_call: 58 | outputs: 59 | matrix: 60 | description: "The determined version matrix" 61 | value: ${{ jobs.params.outputs.matrix }} 62 | refs: 63 | description: "The determined git ref matrix (only during scheduled run)" 64 | value: ${{ jobs.params.outputs.refs }} 65 | 66 | jobs: 67 | params: 68 | runs-on: ubuntu-latest 69 | 70 | outputs: 71 | matrix: ${{ steps.set-matrix.outputs.matrix }} 72 | refs: ${{ steps.set-refs.outputs.matrix }} 73 | 74 | steps: 75 | - name: "[Set-Output] Matrix" 76 | id: set-matrix 77 | run: | 78 | echo "matrix=$( echo '${{ env.MATRIX }}' | jq -M -c )" >> $GITHUB_OUTPUT 79 | 80 | - name: "[Set-Output] Matrix 'Refs' (master branch and latest tag)" 81 | id: set-refs 82 | uses: cytopia/git-ref-matrix-action@v0.1.13 83 | with: 84 | repository_default_branch: master 85 | branches: master 86 | num_latest_tags: 0 87 | if: github.event_name == 'schedule' 88 | 89 | - name: "[DEBUG] Show settings'" 90 | run: | 91 | echo 'Matrix' 92 | echo '--------------------' 93 | echo '${{ steps.set-matrix.outputs.matrix }}' 94 | echo 95 | 96 | echo 'Matrix: Refs' 97 | echo '--------------------' 98 | echo '${{ steps.set-matrix-refs.outputs.matrix }}' 99 | echo 100 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ifneq (,) 2 | .error This Makefile requires GNU Make. 3 | endif 4 | 5 | # Ensure additional Makefiles are present 6 | MAKEFILES = Makefile.docker Makefile.lint 7 | $(MAKEFILES): URL=https://raw.githubusercontent.com/devilbox/makefiles/master/$(@) 8 | $(MAKEFILES): 9 | @if ! (curl --fail -sS -o $(@) $(URL) || wget -O $(@) $(URL)); then \ 10 | echo "Error, curl or wget required."; \ 11 | echo "Exiting."; \ 12 | false; \ 13 | fi 14 | include $(MAKEFILES) 15 | 16 | # Set default Target 17 | .DEFAULT_GOAL := help 18 | 19 | DOCKER_PULL_VARIABLES = PHP_IMG_TAG=$(PHP_IMG_TAG) 20 | 21 | 22 | # ------------------------------------------------------------------------------------------------- 23 | # Default configuration 24 | # ------------------------------------------------------------------------------------------------- 25 | # Own vars 26 | TAG = latest 27 | 28 | # Makefile.docker overwrites 29 | NAME = phpcs 30 | VERSION = latest 31 | IMAGE = cytopia/phpcs 32 | FLAVOUR = latest 33 | FILE = Dockerfile.${FLAVOUR} 34 | DIR = Dockerfiles 35 | 36 | # Extract PHP- and PCS- version from VERSION string 37 | PHP_IMG_TAG = "cli-alpine" 38 | ifeq ($(strip $(VERSION)),latest) 39 | PHP_VERSION = latest 40 | PCS_VERSION = latest 41 | PHP_IMG_TAG = "cli-alpine" 42 | else 43 | PHP_VERSION = $(subst PHP-,,$(shell echo "$(VERSION)" | grep -Eo 'PHP-([.0-9]+|latest)')) 44 | PCS_VERSION = $(subst PCS-,,$(shell echo "$(VERSION)" | grep -Eo 'PCS-([.0-9]+|latest)')) 45 | PHP_IMG_TAG = $(PHP_VERSION)-cli-alpine 46 | endif 47 | 48 | # Extract Image version 49 | ifeq ($(strip $(PHP_VERSION)),latest) 50 | PHP_IMG_TAG = "cli-alpine" 51 | endif 52 | 53 | # Building from master branch: Tag == 'latest' 54 | ifeq ($(strip $(TAG)),latest) 55 | ifeq ($(strip $(VERSION)),latest) 56 | DOCKER_TAG = $(FLAVOUR) 57 | else 58 | ifeq ($(strip $(FLAVOUR)),latest) 59 | ifeq ($(strip $(PHP_VERSION)),latest) 60 | DOCKER_TAG = $(PCS_VERSION) 61 | else 62 | DOCKER_TAG = $(PCS_VERSION)-php$(PHP_VERSION) 63 | endif 64 | else 65 | ifeq ($(strip $(PHP_VERSION)),latest) 66 | DOCKER_TAG = $(FLAVOUR)-$(PCS_VERSION) 67 | else 68 | DOCKER_TAG = $(FLAVOUR)-$(PCS_VERSION)-php$(PHP_VERSION) 69 | endif 70 | endif 71 | endif 72 | # Building from any other branch or tag: Tag == '' 73 | else 74 | ifeq ($(strip $(VERSION)),latest) 75 | ifeq ($(strip $(FLAVOUR)),latest) 76 | DOCKER_TAG = latest-$(TAG) 77 | else 78 | DOCKER_TAG = $(FLAVOUR)-latest-$(TAG) 79 | endif 80 | else 81 | ifeq ($(strip $(FLAVOUR)),latest) 82 | ifeq ($(strip $(PHP_VERSION)),latest) 83 | DOCKER_TAG = $(PCS_VERSION)-$(TAG) 84 | else 85 | DOCKER_TAG = $(PCS_VERSION)-php$(PHP_VERSION)-$(TAG) 86 | endif 87 | else 88 | ifeq ($(strip $(PHP_VERSION)),latest) 89 | DOCKER_TAG = $(FLAVOUR)-$(PCS_VERSION)-$(TAG) 90 | else 91 | DOCKER_TAG = $(FLAVOUR)-$(PCS_VERSION)-php$(PHP_VERSION)-$(TAG) 92 | endif 93 | endif 94 | endif 95 | endif 96 | 97 | # Makefile.lint overwrites 98 | FL_IGNORES = .git/,.github/,tests/ 99 | SC_IGNORES = .git/,.github/,tests/ 100 | JL_IGNORES = .git/,.github/,./tests/ 101 | 102 | 103 | # ------------------------------------------------------------------------------------------------- 104 | # Default Target 105 | # ------------------------------------------------------------------------------------------------- 106 | .PHONY: help 107 | help: 108 | @echo "lint Lint project files and repository" 109 | @echo 110 | @echo "build [ARCH=...] [TAG=...] Build Docker image" 111 | @echo "rebuild [ARCH=...] [TAG=...] Build Docker image without cache" 112 | @echo "push [ARCH=...] [TAG=...] Push Docker image to Docker hub" 113 | @echo 114 | @echo "manifest-create [ARCHES=...] [TAG=...] Create multi-arch manifest" 115 | @echo "manifest-push [TAG=...] Push multi-arch manifest" 116 | @echo 117 | @echo "test [ARCH=...] Test built Docker image" 118 | @echo 119 | 120 | 121 | # ------------------------------------------------------------------------------------------------- 122 | # Docker Targets 123 | # ------------------------------------------------------------------------------------------------- 124 | .PHONY: build 125 | build: ARGS+=--build-arg PCS_VERSION=$(PCS_VERSION) 126 | build: ARGS+=--build-arg PHP_IMG_TAG=$(PHP_IMG_TAG) 127 | build: docker-arch-build 128 | 129 | .PHONY: rebuild 130 | rebuild: ARGS+=--build-arg PCS_VERSION=$(PCS_VERSION) 131 | rebuild: ARGS+=--build-arg PHP_IMG_TAG=$(PHP_IMG_TAG) 132 | rebuild: docker-arch-rebuild 133 | 134 | .PHONY: push 135 | push: docker-arch-push 136 | 137 | 138 | # ------------------------------------------------------------------------------------------------- 139 | # Manifest Targets 140 | # ------------------------------------------------------------------------------------------------- 141 | .PHONY: manifest-create 142 | manifest-create: docker-manifest-create 143 | 144 | .PHONY: manifest-push 145 | manifest-push: docker-manifest-push 146 | 147 | 148 | # ------------------------------------------------------------------------------------------------- 149 | # Test Targets 150 | # ------------------------------------------------------------------------------------------------- 151 | .PHONY: test 152 | test: 153 | test: _test-phpcs-version 154 | test: _test-php-version 155 | test: _test-run 156 | 157 | .PHONY: _test-phpcs-version 158 | _test-phpcs-version: 159 | @echo "------------------------------------------------------------" 160 | @echo "- Testing correct phpcs version" 161 | @echo "------------------------------------------------------------" 162 | @if [ "$(PCS_VERSION)" = "latest" ]; then \ 163 | echo "Fetching latest version from GitHub"; \ 164 | LATEST="$$( \ 165 | curl -L -sS https://github.com/squizlabs/PHP_CodeSniffer/releases \ 166 | | tac | tac \ 167 | | grep -Eo '/[.0-9]+?\.[.0-9]+"' \ 168 | | grep -Eo '[.0-9]+' \ 169 | | sort -V \ 170 | | tail -1 \ 171 | )"; \ 172 | echo "Testing for latest: $${LATEST}"; \ 173 | if ! docker run --rm --platform $(ARCH) $(IMAGE):$(DOCKER_TAG) --version | grep -E "^PHP_CodeSniffer[[:space:]]+version[[:space:]]+v?$${LATEST}"; then \ 174 | echo "Failed"; \ 175 | exit 1; \ 176 | fi; \ 177 | else \ 178 | echo "Testing for tag: $(PCS_VERSION).x.x"; \ 179 | if ! docker run --rm --platform $(ARCH) $(IMAGE):$(DOCKER_TAG) --version | grep -E "^PHP_CodeSniffer[[:space:]]+version[[:space:]]+v?$(PCS_VERSION)\.[.0-9]+"; then \ 180 | echo "Failed"; \ 181 | exit 1; \ 182 | fi; \ 183 | fi; \ 184 | echo "Success"; \ 185 | 186 | .PHONY: _test-php-version 187 | _test-php-version: _get-php-version 188 | @echo "------------------------------------------------------------" 189 | @echo "- Testing correct PHP version" 190 | @echo "------------------------------------------------------------" 191 | @echo "Testing for tag: $(CURRENT_PHP_VERSION)" 192 | @if ! docker run --rm --platform $(ARCH) --entrypoint=php $(IMAGE):$(DOCKER_TAG) --version | head -1 | grep -E "^PHP[[:space:]]+$(CURRENT_PHP_VERSION)([.0-9]+)?"; then \ 193 | echo "Failed"; \ 194 | exit 1; \ 195 | fi; \ 196 | echo "Success"; 197 | 198 | .PHONY: _test-run 199 | _test-run: 200 | @echo "------------------------------------------------------------" 201 | @echo "- Testing phpcs (success)" 202 | @echo "------------------------------------------------------------" 203 | @if ! docker run --rm --platform $(ARCH) -v $(CURRENT_DIR)/tests/ok:/data $(IMAGE):$(DOCKER_TAG) .; then \ 204 | echo "Failed"; \ 205 | exit 1; \ 206 | fi; \ 207 | echo "Success"; 208 | @echo "------------------------------------------------------------" 209 | @echo "- Testing phpcs (failure)" 210 | @echo "------------------------------------------------------------" 211 | @if docker run --rm --platform $(ARCH) -v $(CURRENT_DIR)/tests/fail:/data $(IMAGE):$(DOCKER_TAG) .; then \ 212 | echo "Failed"; \ 213 | exit 1; \ 214 | fi; \ 215 | echo "Success"; 216 | 217 | # Fetch latest available PHP version for cli-alpine 218 | .PHONY: _get-php-version 219 | _get-php-version: 220 | $(eval CURRENT_PHP_VERSION = $(shell \ 221 | if [ "$(PHP_VERSION)" = "latest" ]; then \ 222 | curl -L -sS https://hub.docker.com/api/content/v1/products/images/php \ 223 | | tac | tac \ 224 | | grep -Eo '`[.0-9]+-cli-alpine' \ 225 | | grep -Eo '[.0-9]+' \ 226 | | sort -u \ 227 | | tail -1; \ 228 | else \ 229 | echo $(PHP_VERSION); \ 230 | fi; \ 231 | )) 232 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker image for `phpcs` 2 | 3 | [![Tag](https://img.shields.io/github/tag/cytopia/docker-phpcs.svg)](https://github.com/cytopia/docker-phpcs/releases) 4 | [![](https://img.shields.io/badge/github-cytopia%2Fdocker--phpcs-red.svg)](https://github.com/cytopia/docker-phpcs "github.com/cytopia/docker-phpcs") 5 | [![License](https://img.shields.io/badge/license-MIT-%233DA639.svg)](https://opensource.org/licenses/MIT) 6 | 7 | [![lint](https://github.com/cytopia/docker-phpcs/workflows/lint/badge.svg)](https://github.com/cytopia/docker-phpcs/actions?query=workflow%3Alint) 8 | [![build](https://github.com/cytopia/docker-phpcs/workflows/build/badge.svg)](https://github.com/cytopia/docker-phpcs/actions?query=workflow%3Abuild) 9 | [![nightly](https://github.com/cytopia/docker-phpcs/workflows/nightly/badge.svg)](https://github.com/cytopia/docker-phpcs/actions?query=workflow%3Anightly) 10 | 11 | 12 | > #### All [#awesome-ci](https://github.com/topics/awesome-ci) Docker images 13 | > 14 | > [ansible-lint][alint-git-lnk] **•** 15 | > [ansible][ansible-git-lnk] **•** 16 | > [awesome-ci][aci-git-lnk] **•** 17 | > [bandit][bandit-git-lnk] **•** 18 | > [black][black-git-lnk] **•** 19 | > [checkmake][cm-git-lnk] **•** 20 | > [eslint][elint-git-lnk] **•** 21 | > [file-lint][flint-git-lnk] **•** 22 | > [gofmt][gfmt-git-lnk] **•** 23 | > [goimports][gimp-git-lnk] **•** 24 | > [golint][glint-git-lnk] **•** 25 | > [jsonlint][jlint-git-lnk] **•** 26 | > [kubeval][kubeval-git-lnk] **•** 27 | > [linkcheck][linkcheck-git-lnk] **•** 28 | > [mypy][mypy-git-lnk] **•** 29 | > [php-cs-fixer][pcsf-git-lnk] **•** 30 | > [phpcbf][pcbf-git-lnk] **•** 31 | > [phpcs][pcs-git-lnk] **•** 32 | > [phplint][plint-git-lnk] **•** 33 | > [pycodestyle][pycs-git-lnk] **•** 34 | > [pydocstyle][pyds-git-lnk] **•** 35 | > [pylint][pylint-git-lnk] **•** 36 | > [terraform-docs][tfdocs-git-lnk] **•** 37 | > [terragrunt-fmt][tgfmt-git-lnk] **•** 38 | > [terragrunt][tg-git-lnk] **•** 39 | > [yamlfmt][yfmt-git-lnk] **•** 40 | > [yamllint][ylint-git-lnk] 41 | 42 | View **[Dockerfiles](https://github.com/cytopia/docker-phpcs/blob/master/Dockerfiles/)** on GitHub. 43 | 44 | 45 | **Available Architectures:** `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` 46 | 47 | Tiny Alpine-based multistage-builld dockerized version of [phpcs](https://github.com/squizlabs/PHP_CodeSniffer)[1]. 48 | The image is built nightly against multiple stable versions and pushed to Dockerhub. 49 | 50 | [1] Official project: https://github.com/squizlabs/PHP_CodeSniffer 51 | 52 | ## :whale: Available Docker image versions 53 | 54 | [![](https://img.shields.io/docker/pulls/cytopia/phpcs.svg)](https://hub.docker.com/r/cytopia/phpcs) 55 | [![Docker](https://badgen.net/badge/icon/:latest?icon=docker&label=cytopia/phpcs)](https://hub.docker.com/r/cytopia/phpcs) 56 | 57 | #### Rolling releaess 58 | 59 | The following Docker image tags are rolling releases and are built and updated every night. 60 | 61 | [![nightly](https://github.com/cytopia/docker-phpcs/workflows/nightly/badge.svg)](https://github.com/cytopia/docker-phpcs/actions?query=workflow%3Anightly) 62 | 63 | 64 | | Docker Tag | Git Ref | PHPCS | PHP | Available Architectures | 65 | |-----------------------|--------------|--------------|------------|----------------------------------------------| 66 | | **`latest`** | master | latest | latest | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 67 | | `latest-php8.1` | master | latest | **`8.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 68 | | `latest-php8.0` | master | latest | **`8.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 69 | | `latest-php7.4` | master | latest | **`7.4`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 70 | | `latest-php7.3` | master | latest | **`7.3`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 71 | | `latest-php7.2` | master | latest | **`7.2`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 72 | | `latest-php7.1` | master | latest | **`7.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 73 | | `latest-php7.0` | master | latest | **`7.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 74 | | `latest-php5.6` | master | latest | **`5.6`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 75 | | | | | | | 76 | | **`3`** | master | **`3.x.x`** | latest | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 77 | | `3-php8.1` | master | **`3.x.x`** | **`8.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 78 | | `3-php8.0` | master | **`3.x.x`** | **`8.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 79 | | `3-php7.4` | master | **`3.x.x`** | **`7.4`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 80 | | `3-php7.3` | master | **`3.x.x`** | **`7.3`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 81 | | `3-php7.2` | master | **`3.x.x`** | **`7.2`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 82 | | `3-php7.1` | master | **`3.x.x`** | **`7.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 83 | | `3-php7.0` | master | **`3.x.x`** | **`7.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 84 | | `3-php5.6` | master | **`3.x.x`** | **`5.6`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 85 | | | | | | | 86 | | **`2`** | master | **`2.x.x`** | latest | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 87 | | `2-php8.1` | master | **`2.x.x`** | **`8.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 88 | | `2-php8.0` | master | **`2.x.x`** | **`8.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 89 | | `2-php7.4` | master | **`2.x.x`** | **`7.4`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 90 | | `2-php7.3` | master | **`2.x.x`** | **`7.3`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 91 | | `2-php7.2` | master | **`2.x.x`** | **`7.2`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 92 | | `2-php7.1` | master | **`2.x.x`** | **`7.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 93 | | `2-php7.0` | master | **`2.x.x`** | **`7.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 94 | | `2-php5.6` | master | **`2.x.x`** | **`5.6`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 95 | 96 | #### Point in time releases 97 | 98 | The following Docker image tags are built once and can be used for reproducible builds. Its version never changes so you will have to update tags in your pipelines from time to time in order to stay up-to-date. 99 | 100 | [![build](https://github.com/cytopia/docker-phpcs/workflows/build/badge.svg)](https://github.com/cytopia/docker-phpcs/actions?query=workflow%3Abuild) 101 | 102 | 103 | | Docker Tag | Git Ref | PHPCS | PHP | Available Architectures | 104 | |-----------------------|--------------|--------------|------------|----------------------------------------------| 105 | | **`latest-`** | git: `` | latest | latest | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 106 | | `latest-php8.1-` | git: `` | latest | **`8.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 107 | | `latest-php8.0-` | git: `` | latest | **`8.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 108 | | `latest-php7.4-` | git: `` | latest | **`7.4`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 109 | | `latest-php7.3-` | git: `` | latest | **`7.3`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 110 | | `latest-php7.2-` | git: `` | latest | **`7.2`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 111 | | `latest-php7.1-` | git: `` | latest | **`7.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 112 | | `latest-php7.0-` | git: `` | latest | **`7.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 113 | | `latest-php5.6-` | git: `` | latest | **`5.6`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 114 | | | git: `` | | | | 115 | | **`3-`** | git: `` | **`3.x.x`** | latest | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 116 | | `3-php8.1-` | git: `` | **`3.x.x`** | **`8.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 117 | | `3-php8.0-` | git: `` | **`3.x.x`** | **`8.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 118 | | `3-php7.4-` | git: `` | **`3.x.x`** | **`7.4`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 119 | | `3-php7.3-` | git: `` | **`3.x.x`** | **`7.3`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 120 | | `3-php7.2-` | git: `` | **`3.x.x`** | **`7.2`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 121 | | `3-php7.1-` | git: `` | **`3.x.x`** | **`7.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 122 | | `3-php7.0-` | git: `` | **`3.x.x`** | **`7.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 123 | | `3-php5.6-` | git: `` | **`3.x.x`** | **`5.6`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 124 | | | git: `` | | | | 125 | | **`2-`** | git: `` | **`2.x.x`** | latest | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 126 | | `2-php8.1-` | git: `` | **`2.x.x`** | **`8.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 127 | | `2-php8.0-` | git: `` | **`2.x.x`** | **`8.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 128 | | `2-php7.4-` | git: `` | **`2.x.x`** | **`7.4`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 129 | | `2-php7.3-` | git: `` | **`2.x.x`** | **`7.3`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 130 | | `2-php7.2-` | git: `` | **`2.x.x`** | **`7.2`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 131 | | `2-php7.1-` | git: `` | **`2.x.x`** | **`7.1`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 132 | | `2-php7.0-` | git: `` | **`2.x.x`** | **`7.0`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 133 | | `2-php5.6-` | git: `` | **`2.x.x`** | **`5.6`** | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6` | 134 | 135 | > Where `` refers to the chosen git tag from this repository. 136 | 137 | 138 | ## :open_file_folder: Docker mounts 139 | 140 | The working directory inside the Docker container is **`/data/`** and should be mounted locally. 141 | 142 | 143 | ## :computer: Usage 144 | 145 | ### Basic 146 | ```bash 147 | $ docker run --rm -v $(pwd):/data cytopia/phpcs . 148 | 149 | ---------------------------------------------------------------------- 150 | FOUND 4 ERRORS AFFECTING 3 LINES 151 | ---------------------------------------------------------------------- 152 | 2 | ERROR | [ ] Missing file doc comment 153 | 5 | ERROR | [x] First condition of a multi-line IF statement must 154 | | | directly follow the opening parenthesis 155 | 6 | ERROR | [x] Line indented incorrectly; expected at least 4 156 | | | spaces, found 1 157 | 6 | ERROR | [x] Closing brace must be on a line by itself 158 | ---------------------------------------------------------------------- 159 | PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY 160 | ---------------------------------------------------------------------- 161 | ``` 162 | 163 | ### Custom standard 164 | Custom standards must be mounted inside the container to `/usr/bin/CodeSniffer.conf ` 165 | ```bash 166 | # Via command line 167 | $ docker run --rm -v $(pwd):/data -v CodeSniffer.conf:/usr/bin/CodeSniffer.conf cytopia/phpcs . 168 | ``` 169 | ```yaml 170 | # Docker compose 171 | phpcs: 172 | image: cytopia/phpcs 173 | volumes: 174 | - .:/data 175 | - CodeSniffer.conf:/usr/bin/CodeSniffer.conf 176 | ``` 177 | 178 | 179 | ## :arrows_counterclockwise: Related [#awesome-ci](https://github.com/topics/awesome-ci) projects 180 | 181 | ### Docker images 182 | 183 | Save yourself from installing lot's of dependencies and pick a dockerized version of your favourite 184 | linter below for reproducible local or remote CI tests: 185 | 186 | | GitHub | DockerHub | Type | Description | 187 | |--------|-----------|------|-------------| 188 | | [awesome-ci][aci-git-lnk] | [![aci-hub-img]][aci-hub-lnk] | Basic | Tools for git, file and static source code analysis | 189 | | [file-lint][flint-git-lnk] | [![flint-hub-img]][flint-hub-lnk] | Basic | Baisc source code analysis | 190 | | [linkcheck][linkcheck-git-lnk] | [![linkcheck-hub-img]][flint-hub-lnk] | Basic | Search for URLs in files and validate their HTTP status code | 191 | | [ansible][ansible-git-lnk] | [![ansible-hub-img]][ansible-hub-lnk] | Ansible | Multiple versions and flavours of Ansible | 192 | | [ansible-lint][alint-git-lnk] | [![alint-hub-img]][alint-hub-lnk] | Ansible | Lint Ansible | 193 | | [gofmt][gfmt-git-lnk] | [![gfmt-hub-img]][gfmt-hub-lnk] | Go | Format Go source code **[1]** | 194 | | [goimports][gimp-git-lnk] | [![gimp-hub-img]][gimp-hub-lnk] | Go | Format Go source code **[1]** | 195 | | [golint][glint-git-lnk] | [![glint-hub-img]][glint-hub-lnk] | Go | Lint Go code | 196 | | [eslint][elint-git-lnk] | [![elint-hub-img]][elint-hub-lnk] | Javascript | Lint Javascript code | 197 | | [jsonlint][jlint-git-lnk] | [![jlint-hub-img]][jlint-hub-lnk] | JSON | Lint JSON files **[1]** | 198 | | [kubeval][kubeval-git-lnk] | [![kubeval-hub-img]][kubeval-hub-lnk] | K8s | Lint Kubernetes files | 199 | | [checkmake][cm-git-lnk] | [![cm-hub-img]][cm-hub-lnk] | Make | Lint Makefiles | 200 | | [phpcbf][pcbf-git-lnk] | [![pcbf-hub-img]][pcbf-hub-lnk] | PHP | PHP Code Beautifier and Fixer | 201 | | [phpcs][pcs-git-lnk] | [![pcs-hub-img]][pcs-hub-lnk] | PHP | PHP Code Sniffer | 202 | | [phplint][plint-git-lnk] | [![plint-hub-img]][plint-hub-lnk] | PHP | PHP Code Linter **[1]** | 203 | | [php-cs-fixer][pcsf-git-lnk] | [![pcsf-hub-img]][pcsf-hub-lnk] | PHP | PHP Coding Standards Fixer | 204 | | [bandit][bandit-git-lnk] | [![bandit-hub-img]][bandit-hub-lnk] | Python | A security linter from PyCQA 205 | | [black][black-git-lnk] | [![black-hub-img]][black-hub-lnk] | Python | The uncompromising Python code formatter | 206 | | [mypy][mypy-git-lnk] | [![mypy-hub-img]][mypy-hub-lnk] | Python | Static source code analysis | 207 | | [pycodestyle][pycs-git-lnk] | [![pycs-hub-img]][pycs-hub-lnk] | Python | Python style guide checker | 208 | | [pydocstyle][pyds-git-lnk] | [![pyds-hub-img]][pyds-hub-lnk] | Python | Python docstyle checker | 209 | | [pylint][pylint-git-lnk] | [![pylint-hub-img]][pylint-hub-lnk] | Python | Python source code, bug and quality checker | 210 | | [terraform-docs][tfdocs-git-lnk] | [![tfdocs-hub-img]][tfdocs-hub-lnk] | Terraform | Terraform doc generator (TF 0.12 ready) **[1]** | 211 | | [terragrunt][tg-git-lnk] | [![tg-hub-img]][tg-hub-lnk] | Terraform | Terragrunt and Terraform | 212 | | [terragrunt-fmt][tgfmt-git-lnk] | [![tgfmt-hub-img]][tgfmt-hub-lnk] | Terraform | `terraform fmt` for Terragrunt files **[1]** | 213 | | [yamlfmt][yfmt-git-lnk] | [![yfmt-hub-img]][yfmt-hub-lnk] | Yaml | Format Yaml files **[1]** | 214 | | [yamllint][ylint-git-lnk] | [![ylint-hub-img]][ylint-hub-lnk] | Yaml | Lint Yaml files | 215 | 216 | > **[1]** Uses a shell wrapper to add **enhanced functionality** not available by original project. 217 | 218 | [aci-git-lnk]: https://github.com/cytopia/awesome-ci 219 | [aci-hub-img]: https://img.shields.io/docker/pulls/cytopia/awesome-ci.svg 220 | [aci-hub-lnk]: https://hub.docker.com/r/cytopia/awesome-ci 221 | 222 | [flint-git-lnk]: https://github.com/cytopia/docker-file-lint 223 | [flint-hub-img]: https://img.shields.io/docker/pulls/cytopia/file-lint.svg 224 | [flint-hub-lnk]: https://hub.docker.com/r/cytopia/file-lint 225 | 226 | [linkcheck-git-lnk]: https://github.com/cytopia/docker-linkcheck 227 | [linkcheck-hub-img]: https://img.shields.io/docker/pulls/cytopia/linkcheck.svg 228 | [linkcheck-hub-lnk]: https://hub.docker.com/r/cytopia/linkcheck 229 | 230 | [jlint-git-lnk]: https://github.com/cytopia/docker-jsonlint 231 | [jlint-hub-img]: https://img.shields.io/docker/pulls/cytopia/jsonlint.svg 232 | [jlint-hub-lnk]: https://hub.docker.com/r/cytopia/jsonlint 233 | 234 | [ansible-git-lnk]: https://github.com/cytopia/docker-ansible 235 | [ansible-hub-img]: https://img.shields.io/docker/pulls/cytopia/ansible.svg 236 | [ansible-hub-lnk]: https://hub.docker.com/r/cytopia/ansible 237 | 238 | [alint-git-lnk]: https://github.com/cytopia/docker-ansible-lint 239 | [alint-hub-img]: https://img.shields.io/docker/pulls/cytopia/ansible-lint.svg 240 | [alint-hub-lnk]: https://hub.docker.com/r/cytopia/ansible-lint 241 | 242 | [kubeval-git-lnk]: https://github.com/cytopia/docker-kubeval 243 | [kubeval-hub-img]: https://img.shields.io/docker/pulls/cytopia/kubeval.svg 244 | [kubeval-hub-lnk]: https://hub.docker.com/r/cytopia/kubeval 245 | 246 | [gfmt-git-lnk]: https://github.com/cytopia/docker-gofmt 247 | [gfmt-hub-img]: https://img.shields.io/docker/pulls/cytopia/gofmt.svg 248 | [gfmt-hub-lnk]: https://hub.docker.com/r/cytopia/gofmt 249 | 250 | [gimp-git-lnk]: https://github.com/cytopia/docker-goimports 251 | [gimp-hub-img]: https://img.shields.io/docker/pulls/cytopia/goimports.svg 252 | [gimp-hub-lnk]: https://hub.docker.com/r/cytopia/goimports 253 | 254 | [glint-git-lnk]: https://github.com/cytopia/docker-golint 255 | [glint-hub-img]: https://img.shields.io/docker/pulls/cytopia/golint.svg 256 | [glint-hub-lnk]: https://hub.docker.com/r/cytopia/golint 257 | 258 | [elint-git-lnk]: https://github.com/cytopia/docker-eslint 259 | [elint-hub-img]: https://img.shields.io/docker/pulls/cytopia/eslint.svg 260 | [elint-hub-lnk]: https://hub.docker.com/r/cytopia/eslint 261 | 262 | [cm-git-lnk]: https://github.com/cytopia/docker-checkmake 263 | [cm-hub-img]: https://img.shields.io/docker/pulls/cytopia/checkmake.svg 264 | [cm-hub-lnk]: https://hub.docker.com/r/cytopia/checkmake 265 | 266 | [pcbf-git-lnk]: https://github.com/cytopia/docker-phpcbf 267 | [pcbf-hub-img]: https://img.shields.io/docker/pulls/cytopia/phpcbf.svg 268 | [pcbf-hub-lnk]: https://hub.docker.com/r/cytopia/phpcbf 269 | 270 | [pcs-git-lnk]: https://github.com/cytopia/docker-phpcs 271 | [pcs-hub-img]: https://img.shields.io/docker/pulls/cytopia/phpcs.svg 272 | [pcs-hub-lnk]: https://hub.docker.com/r/cytopia/phpcs 273 | 274 | [plint-git-lnk]: https://github.com/cytopia/docker-phplint 275 | [plint-hub-img]: https://img.shields.io/docker/pulls/cytopia/phplint.svg 276 | [plint-hub-lnk]: https://hub.docker.com/r/cytopia/phplint 277 | 278 | [pcsf-git-lnk]: https://github.com/cytopia/docker-php-cs-fixer 279 | [pcsf-hub-img]: https://img.shields.io/docker/pulls/cytopia/php-cs-fixer.svg 280 | [pcsf-hub-lnk]: https://hub.docker.com/r/cytopia/php-cs-fixer 281 | 282 | [bandit-git-lnk]: https://github.com/cytopia/docker-bandit 283 | [bandit-hub-img]: https://img.shields.io/docker/pulls/cytopia/bandit.svg 284 | [bandit-hub-lnk]: https://hub.docker.com/r/cytopia/bandit 285 | 286 | [black-git-lnk]: https://github.com/cytopia/docker-black 287 | [black-hub-img]: https://img.shields.io/docker/pulls/cytopia/black.svg 288 | [black-hub-lnk]: https://hub.docker.com/r/cytopia/black 289 | 290 | [mypy-git-lnk]: https://github.com/cytopia/docker-mypy 291 | [mypy-hub-img]: https://img.shields.io/docker/pulls/cytopia/mypy.svg 292 | [mypy-hub-lnk]: https://hub.docker.com/r/cytopia/mypy 293 | 294 | [pycs-git-lnk]: https://github.com/cytopia/docker-pycodestyle 295 | [pycs-hub-img]: https://img.shields.io/docker/pulls/cytopia/pycodestyle.svg 296 | [pycs-hub-lnk]: https://hub.docker.com/r/cytopia/pycodestyle 297 | 298 | [pyds-git-lnk]: https://github.com/cytopia/docker-pydocstyle 299 | [pyds-hub-img]: https://img.shields.io/docker/pulls/cytopia/pydocstyle.svg 300 | [pyds-hub-lnk]: https://hub.docker.com/r/cytopia/pydocstyle 301 | 302 | [pylint-git-lnk]: https://github.com/cytopia/docker-pylint 303 | [pylint-hub-img]: https://img.shields.io/docker/pulls/cytopia/pylint.svg 304 | [pylint-hub-lnk]: https://hub.docker.com/r/cytopia/pylint 305 | 306 | [tfdocs-git-lnk]: https://github.com/cytopia/docker-terraform-docs 307 | [tfdocs-hub-img]: https://img.shields.io/docker/pulls/cytopia/terraform-docs.svg 308 | [tfdocs-hub-lnk]: https://hub.docker.com/r/cytopia/terraform-docs 309 | 310 | [tg-git-lnk]: https://github.com/cytopia/docker-terragrunt 311 | [tg-hub-img]: https://img.shields.io/docker/pulls/cytopia/terragrunt.svg 312 | [tg-hub-lnk]: https://hub.docker.com/r/cytopia/terragrunt 313 | 314 | [tgfmt-git-lnk]: https://github.com/cytopia/docker-terragrunt-fmt 315 | [tgfmt-hub-img]: https://img.shields.io/docker/pulls/cytopia/terragrunt-fmt.svg 316 | [tgfmt-hub-lnk]: https://hub.docker.com/r/cytopia/terragrunt-fmt 317 | 318 | [yfmt-git-lnk]: https://github.com/cytopia/docker-yamlfmt 319 | [yfmt-hub-img]: https://img.shields.io/docker/pulls/cytopia/yamlfmt.svg 320 | [yfmt-hub-lnk]: https://hub.docker.com/r/cytopia/yamlfmt 321 | 322 | [ylint-git-lnk]: https://github.com/cytopia/docker-yamllint 323 | [ylint-hub-img]: https://img.shields.io/docker/pulls/cytopia/yamllint.svg 324 | [ylint-hub-lnk]: https://hub.docker.com/r/cytopia/yamllint 325 | 326 | 327 | ### Makefiles 328 | 329 | Visit **[cytopia/makefiles](https://github.com/cytopia/makefiles)** for dependency-less, seamless project integration and minimum required best-practice code linting for CI. 330 | The provided Makefiles will only require GNU Make and Docker itself removing the need to install anything else. 331 | 332 | 333 | ## :page_facing_up: License 334 | 335 | 336 | **[MIT License](LICENSE)** 337 | 338 | Copyright (c) 2019 [cytopia](https://github.com/cytopia) 339 | --------------------------------------------------------------------------------