Skip to content

Tiny Alpine-based dockerized version of Composer package overtrue/phplint to use with pre-commit, Github Actions, GitLab CI and many others.

License

Notifications You must be signed in to change notification settings

shopiqo/docker-phplint

Repository files navigation

PHPLint Docker

GitHub GitHub Workflow Status (branch) GitHub

Description

Tiny Alpine-based dockerized version of Composer package overtrue/phplint to use with pre-commit, Github Actions, GitLab CI and many others.

Supported tags

Docker Docker Pulls

alpine based images:

Docker tag PHP Version Image size
3.0.3-alpine Latest stable 3.0.3 version Docker Image Size (tag)
3.0.2-alpine Latest stable 3.0.2 version Docker Image Size (tag)

Usage

To use this image, pull from Docker Hub, run the following command:

docker pull iermentraut/phplint:3.0.3-alpine

pre-commit (recommended)

---
default_language_version:
    python: python3

default_stages: [commit, push]

repos:
    [...]
    - repo: local
      hooks:
          - id: docker-phplint
            name: docker-phplint
            language: docker_image
            entry: iermentraut/phplint:3.0.3-alpine
            args:
                - "--"
                - "/src"
            types: [file]
            files: \.php

    # or if you don't have a .phplint.yml file:

    - repo: local
      hooks:
          - id: docker-phplint
            name: docker-phplint
            language: docker_image
            entry: iermentraut/phplint:3.0.3-alpine
            args:
                - --no-cache
                - --no-configuration
                - --warning
                - --exclude=vendor
                - --exclude=node_modules
            types: [file]
            files: \.php
    [...]

Standalone

docker run --rm -v $(pwd):/src iermentraut/phplint:3.0.3-alpine \
    -vvv \
    --no-cache \
    --no-configuration \
    --warning \
    --exclude=vendor \
    --exclude=node_modules \
    --extensions=php \
    --jobs=10

# or

docker run --rm -v $(pwd):/src iermentraut/phplint:3.0.3-alpine \
    -vvv \
    -c /src/.phplint.yml

Github Action

Coming soon...

GitLab CI

Coming soon...

About

Tiny Alpine-based dockerized version of Composer package overtrue/phplint to use with pre-commit, Github Actions, GitLab CI and many others.

Topics

Resources

License

Stars

Watchers

Forks