Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
zoom-in

GitHub Action

Run shellcheck with reviewdog

v1.6.0

Run shellcheck with reviewdog

zoom-in

Run shellcheck with reviewdog

🐶 Run shellcheck with reviewdog on pull requests to improve code review experience

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run shellcheck with reviewdog

uses: reviewdog/[email protected]

Learn more about this action in reviewdog/action-shellcheck

Choose a version

GitHub Action: Run shellcheck with reviewdog

Docker Image CI depup release GitHub release (latest SemVer) action-bumpr supported

This action runs shellcheck with reviewdog on pull requests to improve code review experience.

github-pr-check sample github-pr-review sample

Inputs

github_token

Optional. ${{ github.token }} is used by default.

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-pr-review,github-check]. Default is github-pr-check. github-pr-review can use Markdown and add a link to rule page in reviewdog reports.

filter_mode

Optional. Filtering mode for the reviewdog command [added,diff_context,file,nofilter]. Default is added.

fail_on_error

Optional. Exit code for reviewdog when errors are found [true,false] Default is false.

reviewdog_flags

Optional. Additional reviewdog flags

path

Optional. Base directory to run shellcheck. Same as [path] of find command. Default: .

pattern

Optional. File patterns of target files. Same as -name [pattern] of find command. Default: *.sh

exclude

Optional. Exclude patterns of target files. Same as -not -path [exclude] of find command. e.g. ./git/*

shellcheck_flags

Optional. Flags of shellcheck command. Default: --external-sources

Example usage

name: reviewdog
on: [pull_request]
jobs:
  shellcheck:
    name: runner / shellcheck
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: shellcheck
        uses: reviewdog/action-shellcheck@v1
        with:
          github_token: ${{ secrets.github_token }}
          reporter: github-pr-review # Change reporter.
          path: "." # Optional.
          pattern: "*.sh" # Optional.
          exclude: "./.git/*" # Optional.