-
Notifications
You must be signed in to change notification settings - Fork 9
53 lines (52 loc) · 1.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
name: Reviewdog
on: [pull_request]
jobs:
cpplint:
name: runner / cpplint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup reviewdog
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Install cpplint
run: pip install cpplint
- name: run cpplint
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.github_token }}
run: |
cpplint --linelength=120 --recursive . 2>&1 | \
reviewdog -efm="%f:%l: %m" -name="cpplint" -reporter="github-pr-review" \
-level="error" -fail-on-error=true -diff="git diff FETCH_HEAD"
misspell:
name: runner / misspell
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup reviewdog
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Install misspell
run: |
curl -L https://git.io/misspell -o ${{ runner.temp }}/install-misspell.sh
sudo sh ${{ runner.temp }}/install-misspell.sh -b /usr/local/bin/
- name: Run misspell
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.github_token }}
run: |
git diff origin/${GITHUB_BASE_REF}...origin/${GITHUB_HEAD_REF} --name-only \
| xargs misspell -locale=US 2>&1 \
| reviewdog \
-efm="%f:%l:%c: %m" \
-fail-on-error=true \
-level="error" \
-name="misspell" \
-reporter="github-pr-review"