Skip to content

Commit b98fda6

Browse files
authored
Enable linters for golangci-lint (#1221)
* Enable linters for golangci-lint * Remove unused nolint * Fix lint
1 parent 45db4bd commit b98fda6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ linters:
7373
- dogsled
7474
- dupl
7575
- errcheck
76+
- exhaustive
7677
- funlen
7778
- gochecknoinits
7879
- goconst
@@ -91,6 +92,7 @@ linters:
9192
- lll
9293
- misspell
9394
- nakedret
95+
- noctx
9496
- nolintlint
9597
- rowserrcheck
9698
- scopelint
@@ -106,15 +108,13 @@ linters:
106108

107109
# don't enable:
108110
# - asciicheck
109-
# - exhaustive (TODO: enable after next release; current release at time of writing is v1.27)
110111
# - gochecknoglobals
111112
# - gocognit
112113
# - godot
113114
# - godox
114115
# - goerr113
115116
# - maligned
116117
# - nestif
117-
# - noctx (TODO: enable after next release; current release at time of writing is v1.27)
118118
# - prealloc
119119
# - testpackage
120120
# - wsl

pkg/commands/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ func (e *Executor) executeRun(_ *cobra.Command, args []string) {
446446

447447
// to be removed when deadline is finally decommissioned
448448
func (e *Executor) setTimeoutToDeadlineIfOnlyDeadlineIsSet() {
449-
//lint:ignore SA1019 We want to promoted the deprecated config value when needed
450-
deadlineValue := e.cfg.Run.Deadline // nolint:staticcheck
449+
// nolint:staticcheck
450+
deadlineValue := e.cfg.Run.Deadline
451451
if deadlineValue != 0 && e.cfg.Run.Timeout == defaultTimeout {
452452
e.cfg.Run.Timeout = deadlineValue
453453
}

0 commit comments

Comments
 (0)