From ca162a8ba568fc97d8884590a67a0791c3bcb07a Mon Sep 17 00:00:00 2001 From: Rick Yu Date: Wed, 21 Feb 2024 11:46:54 +0800 Subject: [PATCH] fix: broken golangci-lint tag --- Makefile | 2 +- runner/config.go | 5 ++--- runner/engine.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index dee545c4..d2fc38ac 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ LDFLAGS += -X "main.airVersion=$(AIRVER)" LDFLAGS += -X "main.goVersion=$(shell go version | sed -r 's/go version go(.*)\ .*/\1/')" GO := GO111MODULE=on CGO_ENABLED=0 go -GOLANGCI_LINT_VERSION = 1.55.2 +GOLANGCI_LINT_VERSION = v1.56.2 .PHONY: init init: install-golangci-lint diff --git a/runner/config.go b/runner/config.go index 5cffa99b..a5af959c 100644 --- a/runner/config.go +++ b/runner/config.go @@ -350,10 +350,9 @@ func (c *Config) killDelay() time.Duration { // interpret as milliseconds if less than the value of 1 millisecond if c.Build.KillDelay < time.Millisecond { return c.Build.KillDelay * time.Millisecond - } else { - // normalize kill delay to milliseconds - return time.Duration(c.Build.KillDelay.Milliseconds()) * time.Millisecond } + // normalize kill delay to milliseconds + return time.Duration(c.Build.KillDelay.Milliseconds()) * time.Millisecond } func (c *Config) binPath() string { diff --git a/runner/engine.go b/runner/engine.go index b30c9c2a..8f573fe6 100644 --- a/runner/engine.go +++ b/runner/engine.go @@ -113,7 +113,7 @@ func (e *Engine) checkRunEnv() error { } func (e *Engine) watching(root string) error { - return filepath.Walk(root, func(path string, info os.FileInfo, err error) error { + return filepath.Walk(root, func(path string, info os.FileInfo, _ error) error { // NOTE: path is absolute if info != nil && !info.IsDir() { if e.checkIncludeFile(path) {