Skip to content

elevantiq/action-reviewdog-phpstan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action: Run PHPSTAN with ReviewDog

This action runs PHP Static Analyzer with ReviewDog.

Inputs

github_token

Required Must be in form of github_token: ${{ secrets.github_token }}

level

Report level for reviewdog [info,warning,error]. It's same as -level flag of reviewdog. Default warning

phpstan_level

Report level for phpstan. Default 4

reporter

Reporter of reviewdog command [github-pr-check,github-check,github-pr-review]. It's same as -reporter flag of reviewdog. Default github-pr-check

target_directory

Default src

args

This is a catch-all for any other commandline arguments you want to add to PHPStan. Default ''

Usage

phpstan-linter:
    name: PHPStan
    runs-on: ubuntu-latest
    steps:
        -   name: Check out code into the workspace
            uses: actions/checkout@v2
        -   name: Install dependencies for PHPStan
            uses: php-actions/composer@v5
            with:
                php_version: 7.4
                version: 2
                command: install --no-scripts --ignore-platform-reqs
        -   name: Run php check code with reviewdog
            uses: GeneaLabs/[email protected]
            with:
                github_token: '${{ github.token }}'
                level: 'error'
                phpstan_level: 4
                reporter: 'github-pr-review'
                target_directory: 'src'

About

🐾 Run PHPStan with ReviewDog.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 51.9%
  • Dockerfile 48.1%