-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (43 loc) · 1.04 KB
/
lint.yaml
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
name: Lint
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
jobs:
formatter:
strategy:
fail-fast: true
name: Check with formatters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-go@v3
with:
go-version: "1.18.3"
check-latest: true
- name: Install prettier
run: |
yarn global add prettier
- name: Install buf
run: |
go install github.com/bufbuild/buf/cmd/[email protected]
- name: Install shfmt
run: |
go install mvdan.cc/sh/v3/cmd/[email protected]
- name: Check format with prettier
run: |
prettier --check '**/*.{md,yaml,yml}'
- name: Check go format
run: |
test -z "$(gofmt -l .)"
- name: Check proto format
run: |
test -z "$(buf format -d)"
- name: Check shell script format
run: |
test -z "$(shfmt -d -i 2 .)"