Reviewdog PHPStan
Run PHPStan with Reviewdog and report to GitHub
Overview
Woodpecker CI plugin that runs PHPStan with Reviewdog and reports findings to GitHub.
Based on mikebronner/action-reviewdog-phpstan.
Images
| Tag | PHP |
|---|---|
njaaazi/woodpecker-reviewdog-phpstan:8.3 |
8.3 |
njaaazi/woodpecker-reviewdog-phpstan:8.4 |
8.4 |
njaaazi/woodpecker-reviewdog-phpstan:8.5 |
8.5 |
njaaazi/woodpecker-reviewdog-phpstan:latest |
8.5 |
Settings
| Settings Name | Default | Description |
|---|---|---|
github_token |
none | GitHub PAT (repo / public_repo) or GitHub App installation token. Required unless reporter is local. |
level |
warning |
Reviewdog report level: info, warning, error. |
phpstan_level |
4 |
PHPStan analysis level. |
reporter |
github-pr-review |
Reviewdog reporter: github-pr-review, github-pr-check, github-check. |
target_directory |
src |
Directory to scan. |
fail_on_error |
false |
If true, Reviewdog exits 1 when it finds any issue. |
changed_only |
false |
If true, analyse only the PHP files the PR changed under target_directory (from CI_PIPELINE_FILES). Lints everything when that list is empty. |
args |
empty | Extra PHPStan CLI arguments. |
github-pr-review posts inline GitHub PR comments as the token's identity. Use this step on pull_request events. github-check and github-pr-check need an App installation token. Store github_token using Woodpecker secrets.
Examples
steps:
phpstan:
image: njaaazi/woodpecker-reviewdog-phpstan:8.4
settings:
github_token:
from_secret: github_token
level: warning
phpstan_level: 4
reporter: github-pr-review
target_directory: src
when:
event: pull_request