-
-
Notifications
You must be signed in to change notification settings - Fork 32
87 lines (82 loc) · 3.09 KB
/
Copy pathreviewdog.yml
File metadata and controls
87 lines (82 loc) · 3.09 KB
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1
id: reporter
with:
cond: ${{ github.event_name == 'pull_request' }}
if_true: "github-pr-review"
if_false: "github-check"
- uses: reviewdog/action-shellcheck@4c07458293ac342d477251099501a718ae5ef86e # v1.32.0
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: reviewdog/action-misspell@d6429416b12b09b4e2768307d53bef58d172e962 # v1.27.0
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: reviewdog/action-alex@6083b8ca333981fa617c6828c5d8fb21b13d916b # v1.16.0
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
level: warning
actionlint:
name: runner / actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: reviewdog/action-actionlint@437bbe918b0d29544cbf9e8b1d63fe6f4e7a881d # v1.69.0
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
level: warning