-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (54 loc) · 1.81 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
on:
pull_request:
name: Suggestions
jobs:
shell:
name: Shell suggestions
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: false
- 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: docker run --rm -v "$PWD:/mnt" -w /mnt mvdan/shfmt:v3 -i 2 -ci -w .
- name: suggester / shellcheck
uses: reviewdog/action-suggester@v1
with:
tool_name: shellcheck / shfmt
markdownlint-prettier:
name: markdownlint and prettier suggestions
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: false
- run: sudo npm install -g markdownlint-cli
- run: sudo npm install -g prettier
- run: markdownlint --fix --ignore site/_includes . || true
- run: prettier -u -w '**/*.yaml' '**/.*.yaml' '**/*.yml' '**/.*.yml' '**/*.json' '**/*.md' || true
- name: suggester / prettier
uses: reviewdog/action-suggester@v1
with:
tool_name: markdownlint / prettier
black:
name: Black formatter
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "."
- name: suggester / black
uses: reviewdog/action-suggester@v1
with:
tool_name: black