https://github.com/shopiqo/docker-phplint
Tiny Alpine-based dockerized version of Composer package overtrue/phplint to use with pre-commit, Github Actions, GitLab CI and many others.
https://github.com/shopiqo/docker-phplint
coding-standards continuous-integration docker dockerfile linter php pre-commit static-analysis
Last synced: about 1 year ago
JSON representation
Tiny Alpine-based dockerized version of Composer package overtrue/phplint to use with pre-commit, Github Actions, GitLab CI and many others.
- Host: GitHub
- URL: https://github.com/shopiqo/docker-phplint
- Owner: shopiqo
- License: mit
- Created: 2021-11-15T23:42:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-19T22:30:12.000Z (over 4 years ago)
- Last Synced: 2025-02-09T23:33:43.008Z (over 1 year ago)
- Topics: coding-standards, continuous-integration, docker, dockerfile, linter, php, pre-commit, static-analysis
- Language: Dockerfile
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHPLint Docker
[](https://github.com/iermentraut/docker-phplint)


## Description
Tiny Alpine-based dockerized version of Composer package [overtrue/phplint](https://github.com/overtrue/phplint)
to use with `pre-commit`, `Github Actions`, `GitLab CI` and many others.
## Supported tags
[](https://hub.docker.com/r/iermentraut/phplint)
[]()
`alpine` based images:
| Docker tag | PHP Version | Image size |
|------------|-------------| ------------- |
| [3.0.3-alpine](https://github.com/iermentraut/docker-phplint/blob/master/Dockerfile) | Latest stable 3.0.3 version |  |
| [3.0.2-alpine](https://github.com/iermentraut/docker-phplint/blob/master/Dockerfile) | Latest stable 3.0.2 version |  |
## Usage
To use this image, pull from Docker Hub, run the following command:
```bash
docker pull iermentraut/phplint:3.0.3-alpine
```
### pre-commit (recommended)
```yaml
---
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
```bash
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...
```