This is a GitHub action that checks your drupal module against the drupal coding styles (Drupal, DrupalPractice) and outputs the warnings and errors using reviewdog.
By default only issues in added/modified lines are reported.
inputs:
github_token:
description: 'GITHUB_TOKEN'
default: '${{ github.token }}'
### Flags for reviewdog ###
filter_mode:
description: 'Filter results by diff or file [added, diff_context, file, nofilter]'
default: 'added'
level:
description: 'Report level for reviewdog [info,warning,error]'
default: 'error'
reporter:
description: 'Reporter of reviewdog command.'
default: 'github-pr-check'
name: reviewdog
on: [pull_request]
jobs:
# TODO: change `linter_name`.
linter_name:
name: runner / action-drupal-coder
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: chrfritsch/action-drupal-coder@v1
with:
github_token: ${{ secrets.github_token }}
# Possible filter modes [added, diff_context, file, nofilter]'
filter_mode: added
# Possible reviewdog reporter [github-pr-check,github-check,github-pr-review].
reporter: github-pr-review
# Change reporter level if you need.
# GitHub Status Check won't become failure with warning.
level: warning