Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit e625127

Browse files
authored
Merge pull request #613 from ishanrai05/reviewdogShellcheck
add review dog with shell check
2 parents 439c3a9 + 2d80031 commit e625127

2 files changed

Lines changed: 36 additions & 14 deletions

File tree

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
name: Check Shell Script Syntax
1+
name: ShellCheck
22

3-
on: [push, pull_request]
3+
on: [pull_request]
44

55
jobs:
6-
build:
6+
lint:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout
1010
uses: actions/checkout@v2.2.0
11-
- name: Get Diff Action
12-
uses: technote-space/get-diff-action@v1.2.8
11+
- name: shellcheck
12+
uses: reviewdog/action-shellcheck@v1
1313
with:
14-
SUFFIX_FILTER: .sh
15-
- name: Install ShellCheck
16-
run: |
17-
sudo apt-get install shellcheck
18-
if: env.GIT_DIFF
19-
- name: Lint with ShellCheck
20-
run: |
21-
shellcheck --shell=bash -x ${{ env.GIT_DIFF }}
22-
if: env.GIT_DIFF
14+
github_token: ${{ secrets.github_token }}
15+
level: info
16+
fail_on_error: true
17+
shellcheck_flags: '--shell=bash -x'
18+
reporter: github-pr-review
19+
pattern: "*.sh"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: ShellCheck/push
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2.2.0
14+
- name: Get Diff Action
15+
uses: technote-space/get-diff-action@v1.2.8
16+
with:
17+
SUFFIX_FILTER: .sh
18+
- name: Install ShellCheck
19+
run: |
20+
sudo apt-get install shellcheck
21+
if: env.GIT_DIFF
22+
- name: Lint with ShellCheck
23+
run: |
24+
shellcheck --shell=bash -x ${{ env.GIT_DIFF }}
25+
if: env.GIT_DIFF

0 commit comments

Comments
 (0)