-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (68 loc) · 2.15 KB
/
suggestions.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
on:
pull_request:
name: Suggestions
jobs:
shell:
name: Shell suggestions
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: false
- uses: actions/setup-go@v3
- run: echo "$HOME/go/bin" >> "$GITHUB_PATH"
- run: GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
- 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 -x -f diff $(shfmt -f .) | patch -p1
- run: shfmt -i 2 -ci -w .
- name: suggester / shellcheck
uses: reviewdog/action-suggester@v1.6
with:
tool_name: shellcheck / shfmt
markdown:
name: Markdown suggestions
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: false
- run: sudo npm install -g markdownlint-cli
- run: markdownlint --fix --ignore site/_includes . || true
- name: suggester / markdown
uses: reviewdog/action-suggester@v1.6
with:
tool_name: markdownlint-cli
prettier:
name: Prettier suggestions
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: false
- run: sudo npm install -g prettier
- run: prettier -u -w '**/*.yaml' '**/.*.yaml' '**/*.yml' '**/.*.yml' '**/*.json' '**/*.md' || true
- name: suggester / prettier
uses: reviewdog/action-suggester@v1.6
with:
tool_name: prettier
black:
name: Black formatter
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: false
- name: Check files using the black formatter
uses: rickstaa/action-black@v1.3.0
id: action_black
with:
black_args: "."
- name: suggester / black
uses: reviewdog/action-suggester@v1.6
with:
tool_name: black