-
Notifications
You must be signed in to change notification settings - Fork 22
46 lines (37 loc) · 1.03 KB
/
golangci-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
name: golangci-lint
on:
push:
tags:
- v*
branches:
- main
paths:
- "**/*.go"
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
env:
GOPRIVATE: "github.com/loft-sh/*"
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: false
- name: Build logcheck plugin
run: go build -o "tools/logcheck.so" -mod=vendor -buildmode=plugin sigs.k8s.io/logtools/logcheck/plugin
env:
GOWORK: off
- name: Build golangci-lint
run: go build -o "tools/golangci-lint" -mod=vendor ./vendor/github.com/golangci/golangci-lint/cmd/golangci-lint
- name: Run golangci-lint
run: tools/golangci-lint run --out-format=github-actions ./...
env:
LOGCHECK_CONFIG: hack/logcheck.conf