Skip to content

Commit 65dfc2b

Browse files
pratap0007divyansh42
authored andcommitted
Migrate the golanci to version v2
Signed-off-by: Shiv Verma <shverma@redhat.com>
1 parent 02bf559 commit 65dfc2b

3 files changed

Lines changed: 45 additions & 38 deletions

File tree

.golangci.yml

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,68 @@
1-
issues:
2-
exclude-dirs:
3-
- vendor
1+
version: "2"
42
run:
53
build-tags:
64
- e2e
7-
linters-settings:
8-
gocritic:
9-
disabled-checks:
10-
- unlambda
11-
gofumpt:
12-
extra-rules: true
135
linters:
146
enable:
157
- asciicheck
168
- bodyclose
179
- dogsled
10+
- dupl
1811
- durationcheck
12+
- errcheck
13+
- errorlint
1914
- exhaustive
20-
- exportloopref
2115
- forbidigo
2216
- forcetypeassert
2317
- gochecknoinits
24-
- dupl
25-
- errcheck
26-
- errorlint
27-
- gofumpt
28-
- goimports
29-
- gosec
3018
- gocritic
31-
- misspell
19+
- goheader
20+
- gomodguard
21+
- goprintffuncname
3222
- gosec
33-
- gosimple
3423
- govet
3524
- importas
3625
- makezero
26+
- misspell
3727
- nakedret
38-
- predeclared
39-
- revive
40-
- staticcheck
41-
- stylecheck
42-
- unused
43-
- unparam
44-
- gochecknoinits
45-
# - goconst
46-
# - gocyclo
47-
# - goerr113
48-
# - gofmt
49-
- goheader
50-
- gomodguard
51-
- goprintffuncname
5228
- nilerr
5329
- noctx
54-
# - nolintlint (gofumpt conflict with it, create space all the time so :shrug:)
5530
- prealloc
31+
- predeclared
5632
- promlinter
57-
# - rowserrcheck
58-
# - sqlclosecheck
33+
- revive
34+
- staticcheck
5935
- tparallel
60-
#- unconvert
61-
# - wastedassign
36+
- unparam
37+
- unused
6238
- whitespace
39+
settings:
40+
gocritic:
41+
disabled-checks:
42+
- unlambda
43+
exclusions:
44+
generated: lax
45+
presets:
46+
- comments
47+
- common-false-positives
48+
- legacy
49+
- std-error-handling
50+
paths:
51+
- vendor
52+
- third_party$
53+
- builtin$
54+
- examples$
55+
formatters:
56+
enable:
57+
- gofumpt
58+
- goimports
59+
settings:
60+
gofumpt:
61+
extra-rules: true
62+
exclusions:
63+
generated: lax
64+
paths:
65+
- vendor
66+
- third_party$
67+
- builtin$
68+
- examples$

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ func main() {
9292
}
9393

9494
// if we have found the plugin then sysexec it by replacing current process.
95+
//nolint:gosec // G702: plugin binary path from plugins.FindPlugin (tkn-* under plugin dir or PATH), argv forwarded like kubectl/tkn plugins.
9596
if err := syscall.Exec(exCmd, append([]string{exCmd}, os.Args[2:]...), os.Environ()); err != nil {
9697
fmt.Fprintf(os.Stderr, "Command finished with error: %v", err)
9798
os.Exit(127)

pkg/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"pac": "0.27.3", "tkn": "0.37.4", "results": "0.10.0", "manualapprovalgate": "0.2.2", "opc": "1.15.4"}
1+
{"pac": "0.27.3", "tkn": "0.37.4", "results": "0.10.0", "manualapprovalgate": "0.2.2", "opc": "1.15.5"}

0 commit comments

Comments
 (0)