-
-
Notifications
You must be signed in to change notification settings - Fork 23
87 lines (82 loc) · 2.63 KB
/
reviewdog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: reviewdog
on:
push:
branches:
- master
pull_request:
jobs:
shellcheck:
name: runner / shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haya14busa/action-cond@v1
id: reporter
with:
cond: ${{ github.event_name == 'pull_request' }}
if_true: "github-pr-review"
if_false: "github-check"
- uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: ${{ steps.reporter.outputs.value }}
level: warning
test-shell:
name: runner / suggester / shell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install mvdan/sh
run: |
shfmtversion="v3.6.0"
wget -q https://github.com/mvdan/sh/releases/download/${shfmtversion?}/shfmt_${shfmtversion?}_linux_amd64
sudo install shfmt_${shfmtversion?}_linux_amd64 /usr/local/bin/shfmt
rm shfmt_${shfmtversion?}_linux_amd64
- run: shfmt -i 2 -ci -w .
- name: suggester / shfmt
uses: reviewdog/action-suggester@master
with:
tool_name: shfmt
# Need to install latest shellcheck to use diff output format as of writing (2020/08/03).
- name: install shellcheck
run: |
scversion="latest"
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
sudo cp "shellcheck-${scversion}/shellcheck" /usr/local/bin/
rm -rf "shellcheck-${scversion}/shellcheck"
- run: shellcheck -f diff "$(shfmt -f .)" | patch -p1
- name: suggester / shellcheck
uses: reviewdog/action-suggester@master
with:
tool_name: shellcheck
misspell:
name: runner / misspell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
level: warning
locale: "US"
alex:
name: runner / alex
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-alex@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
level: warning
actionlint:
name: runner / actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-actionlint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
level: warning