-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (35 loc) · 957 Bytes
/
lint.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
name: Lint
on:
pull_request:
paths-ignore:
- "**.md"
push:
paths-ignore:
- "**.md"
schedule:
- cron: "0 0 * * *" # daily at midnight
jobs:
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Update Shellcheck
run: |
sudo apt install xz-utils
scversion="stable"
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/bin/
shellcheck --version
- name: Shellcheck
run: shellcheck -x bin/* -P lib/
shfmt:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install shfmt
run: brew install shfmt
- name: Run shfmt
run: shfmt -d -i 2 -ci .