-
Notifications
You must be signed in to change notification settings - Fork 0
234 lines (213 loc) · 6.67 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
name: 🐶 reviewdog
on: pull_request
jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🐶 reviewdog with actionlint
uses: reviewdog/action-actionlint@v1
continue-on-error: true
with:
fail_on_error: false
filter_mode: nofilter
github_token: ${{ secrets.github_token }}
level: error
reporter: github-pr-review
tool_name: actionlint
hadolint:
name: runner / hadolint
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🐶 reviewdog with hadolint (Dockerfile)
uses: reviewdog/action-hadolint@v1
continue-on-error: true
with:
filter_mode: nofilter
reporter: github-pr-review
github_token: ${{ secrets.github_token }}
shellcheck:
name: runner / shellcheck
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🐶 reviewdog with shellcheck (shell)
uses: reviewdog/action-shellcheck@v1
with:
check_all_files_with_shebangs: "true" # Optional.
exclude: "./.git/*" # Optional.
fail_on_error: false
filter_mode: nofilter
github_token: ${{ secrets.github_token }}
path: "." # Optional.
pattern: "*.sh" # Optional.
reporter: github-pr-review
shfmt:
name: runner / shfmt
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🐶 reviewdog with shfmt (shell)
uses: reviewdog/action-shfmt@v1
continue-on-error: true
with:
check_all_files_with_shebangs: true
exclude: "*/.git/*"
fail_on_error: false
filter_mode: nofilter
github_token: ${{ secrets.github_token }}
level: "warning"
path: "."
pattern: "*.sh"
reporter: github-pr-review
markdownlint:
name: runner / markdownlint
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🐶 reviewdog with markdownlint (markdown)
continue-on-error: true
uses: reviewdog/action-markdownlint@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
level: warning
filter_mode: nofilter
fail_on_error: false
tsc:
name: runner / tsc
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🧩 Install dependencies
uses: ./.github/actions/setup
with:
github_packages_token: ${{ secrets.GH_PACKAGES_TOKEN }}
- name: 🐶 reviewdog with tsc (TypeScript) - packages/ui
uses: EPMatt/reviewdog-action-tsc@v1
with:
github_token: ${{ secrets.github_token }}
workdir: "."
level: error
reporter: github-pr-review
filter_mode: nofilter
fail_on_error: false
tsc_flags: "--noEmit --pretty --project packages/ui"
- name: 🐶 reviewdog with tsc (TypeScript) - apps/web
uses: EPMatt/reviewdog-action-tsc@v1
with:
github_token: ${{ secrets.github_token }}
workdir: "."
level: error
reporter: github-pr-review
filter_mode: nofilter
fail_on_error: false
tsc_flags: "--noEmit --pretty --project apps/web"
biome:
name: runner / Biome
runs-on: ubuntu-latest
continue-on-error: true
permissions:
contents: read
pull-requests: write
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🐶 Setup reviewdog
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
biome-version: latest
token: ${{ secrets.github_token }}
working-dir: "."
version: "latest"
- name: 🐶 reviewdog with Biome
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.github_token }}
continue-on-error: true
shell: bash
run: |
biome ci --formatter-enabled=false --linter-enabled=true . 2>&1 1>/dev/null |
sed 's/ *$//' |
awk 'BEGIN { RS=""; ORS="\n\n" } { if (index($0, "│") > 0) { print " ```\n" $0 "\n ```" } else { print $0 } }' |
reviewdog \
-efm="%-G%f ci ━%#" \
-efm="%-G%f lint ━%#" \
-efm="%-Gci ━%#" \
-efm="%E%f:%l:%c %.%#" \
-efm="%E%f %.%#" \
-efm="%C" \
-efm="%C × %m" \
-efm="%C %m" \
-efm="%-G%.%#" \
-name="Biome" \
-reporter="github-pr-review" \
-filter-mode="nofilter" \
-fail-on-error="false" \
-level="error"
# eslint:
# name: runner / eslint
# runs-on: ubuntu-latest
# permissions:
# contents: read
# pull-requests: write
# steps:
# - name: 📥 Checkout code
# uses: actions/checkout@v4
#
# - name: 🧩 Install dependencies
# uses: ./.github/actions/setup
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
#
# - name: 🐶 reviewdog with ESLint (TypeScript) - apps/web
# uses: reviewdog/action-eslint@v1
# continue-on-error: true
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# level: error
# reporter: github-pr-review
# filter_mode: nofilter
# fail_on_error: false
# workdir: apps/web
# eslint_flags: --ext ts,tsx ./app
#
# - name: 🐶 reviewdog with ESLint (TypeScript) - packages/ui
# uses: reviewdog/action-eslint@v1
# continue-on-error: true
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# level: error
# reporter: github-pr-review
# filter_mode: nofilter
# fail_on_error: false
# workdir: packages/ui
# eslint_flags: --ext ts,tsx ./src
misspell:
name: runner / misspell
continue-on-error: true
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🐶 reviewdog with misspell
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
locale: "US"
level: "info"
reporter: "github-pr-review"
path: "."
filter_mode: "nofilter"
fail_on_error: "false"