Skip to content

Commit ee0211c

Browse files
committed
chore: switch to GCL modules
1 parent 17c4a39 commit ee0211c

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

.custom-gcl.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This has to be >= v1.57.0 for module plugin system support.
2+
version: v1.61.0
3+
plugins:
4+
- module: "sigs.k8s.io/logtools"
5+
import: "sigs.k8s.io/logtools/logcheck/gclplugin"
6+
version: v0.9.0
7+

.github/workflows/golangci-lint.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,11 @@ jobs:
2727
go-version-file: "go.mod"
2828
cache: false
2929

30-
- name: Build logcheck plugin
31-
run: go build -o "tools/logcheck.so" -mod=vendor -buildmode=plugin sigs.k8s.io/logtools/logcheck/plugin
32-
env:
33-
GOWORK: off
30+
- name: Install golangci-lint
31+
run: go install github.com/golangci/golangci-lint/cmd/[email protected]
3432

35-
- name: Build golangci-lint
36-
run: go build -o "tools/golangci-lint" -mod=vendor ./vendor/github.com/golangci/golangci-lint/cmd/golangci-lint
33+
- name: Build custom golangci-lint
34+
run: golangci-lint custom
3735

3836
- name: Run golangci-lint
39-
run: tools/golangci-lint run --out-format=github-actions ./...
40-
env:
41-
LOGCHECK_CONFIG: hack/logcheck.conf
37+
run: ./custom-gcl run

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ devvalues.yaml
3535
kubeconfig.yaml
3636

3737
/tools
38+
custom-gcl

.golangci.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ linters:
77
- asasalint
88
- asciicheck
99
- bidichk
10+
- copyloopvar
1011
- decorder
1112
- dupl
1213
- durationcheck
@@ -15,7 +16,6 @@ linters:
1516
- errname
1617
- errorlint
1718
- exhaustive
18-
- exportloopref
1919
- ginkgolinter
2020
- gocheckcompilerdirectives
2121
- gocritic
@@ -57,9 +57,15 @@ linters:
5757
linters-settings:
5858
custom:
5959
logcheck:
60-
path: tools/logcheck.so
60+
type: "module"
6161
description: structured logging checker
6262
original-url: sigs.k8s.io/logtools/logcheck
63+
settings:
64+
check:
65+
contextual: true
66+
config: |
67+
structured .*
68+
contextual .*
6369
6470
gofmt:
6571
simplify: true

0 commit comments

Comments
 (0)