Merge pull request #5572 from corneliusweig/w/upgrade-linter
Bump golangci-lint to v1.20.0pull/5602/head
commit
ffc81a8d9d
6
Makefile
6
Makefile
|
@ -51,13 +51,13 @@ MINIKUBE_RELEASES_URL=https://github.com/kubernetes/minikube/releases/download
|
|||
|
||||
KERNEL_VERSION ?= 4.15
|
||||
# latest from https://github.com/golangci/golangci-lint/releases
|
||||
GOLINT_VERSION ?= v1.18.0
|
||||
GOLINT_VERSION ?= v1.20.0
|
||||
# Limit number of default jobs, to avoid the CI builds running out of memory
|
||||
GOLINT_JOBS ?= 4
|
||||
# see https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint
|
||||
GOLINT_GOGC ?= 8
|
||||
GOLINT_GOGC ?= 100
|
||||
# options for lint (golangci-lint)
|
||||
GOLINT_OPTIONS = --deadline 4m \
|
||||
GOLINT_OPTIONS = --timeout 4m \
|
||||
--build-tags "${MINIKUBE_INTEGRATION_BUILD_TAGS}" \
|
||||
--enable goimports,gocritic,golint,gocyclo,misspell,nakedret,stylecheck,unconvert,unparam \
|
||||
--exclude 'variable on range scope.*in function literal|ifElseChain'
|
||||
|
|
|
@ -385,7 +385,7 @@ func checkKeyValueExpression(kvp *ast.KeyValueExpr, e *state) {
|
|||
|
||||
// Ok now this is just a mess
|
||||
if help, ok := kvp.Value.(*ast.BinaryExpr); ok {
|
||||
s := checkBinaryExpression(help, e)
|
||||
s := checkBinaryExpression(help)
|
||||
if s != "" {
|
||||
e.translations[s] = ""
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ func checkKeyValueExpression(kvp *ast.KeyValueExpr, e *state) {
|
|||
}
|
||||
|
||||
// checkBinaryExpression checks binary expressions, stuff of the form x + y, for strings and concats them
|
||||
func checkBinaryExpression(b *ast.BinaryExpr, e *state) string {
|
||||
func checkBinaryExpression(b *ast.BinaryExpr) string {
|
||||
// Check the left side
|
||||
var s string
|
||||
if l, ok := b.X.(*ast.BasicLit); ok {
|
||||
|
@ -410,7 +410,7 @@ func checkBinaryExpression(b *ast.BinaryExpr, e *state) string {
|
|||
}
|
||||
|
||||
if b1, ok := b.X.(*ast.BinaryExpr); ok {
|
||||
if x := checkBinaryExpression(b1, e); x != "" {
|
||||
if x := checkBinaryExpression(b1); x != "" {
|
||||
s += x
|
||||
}
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ func checkBinaryExpression(b *ast.BinaryExpr, e *state) string {
|
|||
}
|
||||
|
||||
if b1, ok := b.Y.(*ast.BinaryExpr); ok {
|
||||
if x := checkBinaryExpression(b1, e); x != "" {
|
||||
if x := checkBinaryExpression(b1); x != "" {
|
||||
s += x
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,8 +122,8 @@ func (mgr *Manager) run(ctx context.Context, t controller, ready, check, done ch
|
|||
}
|
||||
}
|
||||
|
||||
func (mgr *Manager) cleanup(t controller) *Status {
|
||||
return t.cleanup()
|
||||
func (mgr *Manager) cleanup(t controller) {
|
||||
t.cleanup()
|
||||
}
|
||||
|
||||
// CleanupNotRunningTunnels cleans up tunnels that are not running
|
||||
|
|
Loading…
Reference in New Issue