Skip to content

hrysd/action-php_codesniffer

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action: Run PHP_CodeSniffer with reviewdog

This action runs PHP_CodeSniffer with reviewdog.

Test reviewdog depup release GitHub release (latest SemVer) action-bumpr supported

github-pr-review demo github-pr-check demo

Inputs

github_token

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

level

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

reporter

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

standard

Required. Coding standard or path to PHP_CodeSniffer's configuration file

target_directory

Required. Directory to run PHP_CodeSniffer

Example Usage

name: reviewdog
on: [pull_request]

jobs:
  php_codesniffer:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: hrysd/action-php_codesniffer@v1
        with:
          github_token: ${{ secrets.github_token }}
          standard: PSR12
          target_directory: src

Development

Release

You can bump version on merging Pull Requests with specific labels (bump:major,bump:minor,bump:patch). Pushing tag manually by yourself also work.

This action updates major/minor release tags on a tag push. e.g. Update v1 and v1.2 tag when released v1.2.3. ref: https://help.github.com/en/articles/about-actions#versioning-your-action

Lint - reviewdog integration

This reviewdog action template itself is integrated with reviewdog to run lints which is useful for Docker container based actions.

reviewdog integration

Supported linters:

Dependencies Update Automation

This repository uses haya14busa/action-depup to update reviewdog version.

reviewdog depup demo