Skip to content

Commit

Permalink
Merge pull request #4840 from oscr/update-golangci-lint
Browse files Browse the repository at this point in the history
Update golangci-lint version (1.49.0 -> 1.50.1) and enable linters: dupword and testableexamples
  • Loading branch information
k8s-ci-robot authored Nov 17, 2022
2 parents 8ea5eb2 + e16b0f0 commit 7897872
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ linters:
- depguard
- dogsled
- dupl
- dupword
- durationcheck
- errcheck
- errname
Expand Down Expand Up @@ -75,6 +76,7 @@ linters:
- tagliatelle
- tenv
- testpackage
- testableexamples
- thelper
- tparallel
- typecheck
Expand All @@ -89,7 +91,7 @@ linters:
- asasalint
- usestdlibvars
- interfacebloat
- logrlint
- loggercheck
- reassign

linters-settings:
Expand Down
2 changes: 1 addition & 1 deletion Makefile-tools.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2022 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0

GOLANGCI_LINT_VERSION=v1.49.0
GOLANGCI_LINT_VERSION=v1.50.1

MYGOBIN = $(shell go env GOBIN)
ifeq ($(MYGOBIN),)
Expand Down
1 change: 1 addition & 0 deletions cmd/pluginator/internal/krmfunction/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func (c *Converter) prepareWrapper(content string) string {
}
// assign to plugin variable
if strings.TrimSpace(line) == "var plugin resmap.Configurable" {
//nolint:dupword
line += `
// KustomizePlugin is a global variable defined in every plugin
plugin = &KustomizePlugin
Expand Down
2 changes: 1 addition & 1 deletion kyaml/filesys/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func PathJoin(incoming []string) string {
// relative paths; if it weren't, this function could convert absolute
// paths to relative paths, which is not desirable.
//
// - For robustness (liberal input, conservative output) Pos values that
// - For robustness (liberal input, conservative output) Pos values
// that are too small (large) to index the split filepath result in a
// prefix (postfix) rather than an error. Use extreme position values
// to assure a prefix or postfix (e.g. 0 will always prefix, and
Expand Down

0 comments on commit 7897872

Please sign in to comment.