Skip to content

Commit

Permalink
Enable linters for golangci-lint (#1221)
Browse files Browse the repository at this point in the history
* Enable linters for golangci-lint

* Remove unused nolint

* Fix lint
  • Loading branch information
sonatard authored Jul 10, 2020
1 parent 45db4bd commit b98fda6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ linters:
- dogsled
- dupl
- errcheck
- exhaustive
- funlen
- gochecknoinits
- goconst
Expand All @@ -91,6 +92,7 @@ linters:
- lll
- misspell
- nakedret
- noctx
- nolintlint
- rowserrcheck
- scopelint
Expand All @@ -106,15 +108,13 @@ linters:

# don't enable:
# - asciicheck
# - exhaustive (TODO: enable after next release; current release at time of writing is v1.27)
# - gochecknoglobals
# - gocognit
# - godot
# - godox
# - goerr113
# - maligned
# - nestif
# - noctx (TODO: enable after next release; current release at time of writing is v1.27)
# - prealloc
# - testpackage
# - wsl
Expand Down
4 changes: 2 additions & 2 deletions pkg/commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ func (e *Executor) executeRun(_ *cobra.Command, args []string) {

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

0 comments on commit b98fda6

Please sign in to comment.