-
Notifications
You must be signed in to change notification settings - Fork 931
56 lines (54 loc) · 1.14 KB
/
golangci-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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: golangci-lint
on:
push:
tags:
- "v9.*"
- "v8.*"
- "v7.*"
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- main
- v9
- v8
- v7
paths-ignore:
- "doc/**"
- ".gitpod.yml"
- "README.md"
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61
args: -v --exclude-dirs cf --exclude-dirs fixtures --exclude-dirs plugin --exclude-dirs command/plugin
format:
name: Run go fmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set Up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Run go fmt
run: make format && git diff --exit-code