Skip to content

Commit 333209e

Browse files
committed
Update linter
1 parent b72145e commit 333209e

4 files changed

Lines changed: 121 additions & 199 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ on:
1010

1111
env:
1212
# Common versions
13-
GO_VERSION: '1.21.6'
14-
GOLANGCI_VERSION: 'v1.55.2'
15-
DOCKER_BUILDX_VERSION: 'v0.8.2'
13+
GO_VERSION: '1.24.3'
14+
GOLANGCI_VERSION: 'v2.1.6'
15+
DOCKER_BUILDX_VERSION: 'v0.25.0'
1616

1717
jobs:
1818
detect-noop:

.golangci.yaml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
version: "2"
2+
linters:
3+
enable:
4+
- asasalint
5+
- asciicheck
6+
- bidichk
7+
- bodyclose
8+
- contextcheck
9+
- durationcheck
10+
- errchkjson
11+
- errorlint
12+
- exhaustive
13+
- gocheckcompilerdirectives
14+
- gochecksumtype
15+
- goconst
16+
- gocritic
17+
- gocyclo
18+
- gosec
19+
- gosmopolitan
20+
- loggercheck
21+
- makezero
22+
- misspell
23+
- musttag
24+
- nakedret
25+
- nilerr
26+
- nilnesserr
27+
- noctx
28+
- prealloc
29+
- protogetter
30+
- reassign
31+
- recvcheck
32+
- rowserrcheck
33+
- spancheck
34+
- sqlclosecheck
35+
- testifylint
36+
- unconvert
37+
- unparam
38+
- zerologlint
39+
settings:
40+
dupl:
41+
threshold: 100
42+
errcheck:
43+
check-type-assertions: false
44+
check-blank: false
45+
goconst:
46+
min-len: 3
47+
min-occurrences: 5
48+
gocritic:
49+
enabled-tags:
50+
- performance
51+
settings:
52+
captLocal:
53+
paramsOnly: true
54+
rangeValCopy:
55+
sizeThreshold: 32
56+
gocyclo:
57+
min-complexity: 10
58+
lll:
59+
tab-width: 1
60+
nakedret:
61+
max-func-lines: 30
62+
prealloc:
63+
simple: true
64+
range-loops: true
65+
for-loops: false
66+
unparam:
67+
check-exported: false
68+
exclusions:
69+
generated: lax
70+
rules:
71+
- linters:
72+
- dupl
73+
- errcheck
74+
- gocyclo
75+
- gosec
76+
- scopelint
77+
- unparam
78+
path: _test(ing)?\.go
79+
- linters:
80+
- gocritic
81+
path: _test\.go
82+
text: (unnamedResult|exitAfterDefer)
83+
- linters:
84+
- gocritic
85+
text: '(hugeParam|rangeValCopy):'
86+
- linters:
87+
- staticcheck
88+
text: 'SA3000:'
89+
- linters:
90+
- gosec
91+
text: 'G101:'
92+
- linters:
93+
- gosec
94+
text: 'G104:'
95+
paths:
96+
- third_party$
97+
- builtin$
98+
- examples$
99+
issues:
100+
max-same-issues: 0
101+
new: false
102+
formatters:
103+
enable:
104+
- gofmt
105+
- goimports
106+
settings:
107+
gofmt:
108+
simplify: true
109+
goimports:
110+
local-prefixes:
111+
- github.com/upbound/upjet-provider-template
112+
exclusions:
113+
generated: lax
114+
paths:
115+
- third_party$
116+
- builtin$
117+
- examples$

.golangci.yml

Lines changed: 0 additions & 195 deletions
This file was deleted.

cmd/generator/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414

1515
ujconfig "github.com/crossplane/upjet/pkg/config"
1616
"github.com/crossplane/upjet/pkg/pipeline"
17-
"gopkg.in/alecthomas/kingpin.v2"
1817
"github.com/philips-software/provider-hsdp/config"
18+
"gopkg.in/alecthomas/kingpin.v2"
1919
)
2020

2121
func main() {

0 commit comments

Comments
 (0)