fbartels / action-shellcheck

Run shellcheck with reviewdog

Home Page:https://github.com/marketplace?type=actions&query=reviewdog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Action: Run shellcheck with reviewdog

Docker Image CI Release

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

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-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.

path

Optional. Base directory to run shellcheck. Default: .

exclude

Optional. Exclude patterns of target files. Same as --exclude-dir of grep command.

Default: .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.
          exclude: ".git" # Optional.

About

Run shellcheck with reviewdog

https://github.com/marketplace?type=actions&query=reviewdog

License:MIT License


Languages

Language:Shell 76.2%Language:Dockerfile 23.8%