This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-infra-e2e.git


The following commit(s) were added to refs/heads/main by this push:
     new 1485ae0  make linter happy (#125)
1485ae0 is described below

commit 1485ae03f0ad90496ad7626a5ae4a6a73a1f6296
Author: Hoshea Jiang <fgk...@gmail.com>
AuthorDate: Wed Nov 8 18:40:52 2023 +0800

    make linter happy (#125)
---
 .golangci.yml                         | 9 ++-------
 Makefile                              | 2 +-
 cmd/e2e/main.go                       | 2 +-
 commands/cleanup/cleanup.go           | 2 +-
 commands/root.go                      | 2 +-
 commands/run/run.go                   | 2 +-
 commands/trigger/trigger.go           | 2 +-
 commands/version.go                   | 2 +-
 internal/components/trigger/http.go   | 1 +
 internal/components/verifier/funcs.go | 2 +-
 internal/logger/log.go                | 2 +-
 11 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/.golangci.yml b/.golangci.yml
index 91d074d..1e9901e 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -36,11 +36,6 @@ linters-settings:
   goconst:
     min-len: 2
     min-occurrences: 2
-  depguard:
-    list-type: blacklist
-    include-go-root: true
-    packages-with-error-messages:
-      fmt: "logging is allowed only by logutils.Log"
   misspell:
     locale: US
     ignore-words:
@@ -98,7 +93,6 @@ linters-settings:
 linters:
   enable:
     - deadcode
-    - depguard
     - dogsled
     - dupl
     - errcheck
@@ -115,7 +109,6 @@ linters:
     - ineffassign
     - lll
     - misspell
-    - nakedret
     - staticcheck
     - stylecheck
     - typecheck
@@ -125,6 +118,8 @@ linters:
     - whitespace
   disable:
     - structcheck
+    - depguard
+    - nakedret
 
 service:
   golangci-lint-version: 1.20.x
diff --git a/Makefile b/Makefile
index bf5deb6..78797b4 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ all: clean lint test build
 
 .PHONY: lint
 lint:
-       $(GO_LINT) version || curl -sSfL 
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh 
-s -- -b $(GO_PATH)/bin -d "v1.46.2"
+       $(GO_LINT) version || curl -sSfL 
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh 
-s -- -b $(GO_PATH)/bin -d "v1.55.2"
        $(GO_LINT) run -v --timeout 5m ./...
 
 .PHONY: fix-lint
diff --git a/cmd/e2e/main.go b/cmd/e2e/main.go
index 0422241..ee599db 100644
--- a/cmd/e2e/main.go
+++ b/cmd/e2e/main.go
@@ -14,7 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
-//
+
 package main
 
 import (
diff --git a/commands/cleanup/cleanup.go b/commands/cleanup/cleanup.go
index 3e7079d..fdc5daa 100644
--- a/commands/cleanup/cleanup.go
+++ b/commands/cleanup/cleanup.go
@@ -1,4 +1,3 @@
-//
 // Licensed to Apache Software Foundation (ASF) under one or more contributor
 // license agreements. See the NOTICE file distributed with
 // this work for additional information regarding copyright
@@ -15,6 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
+
 package cleanup
 
 import (
diff --git a/commands/root.go b/commands/root.go
index 1fec787..31e3c8f 100644
--- a/commands/root.go
+++ b/commands/root.go
@@ -14,7 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
-//
+
 package commands
 
 import (
diff --git a/commands/run/run.go b/commands/run/run.go
index fef97d3..a304779 100644
--- a/commands/run/run.go
+++ b/commands/run/run.go
@@ -1,4 +1,3 @@
-//
 // Licensed to Apache Software Foundation (ASF) under one or more contributor
 // license agreements. See the NOTICE file distributed with
 // this work for additional information regarding copyright
@@ -15,6 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
+
 package run
 
 import (
diff --git a/commands/trigger/trigger.go b/commands/trigger/trigger.go
index ca82261..cb49b54 100644
--- a/commands/trigger/trigger.go
+++ b/commands/trigger/trigger.go
@@ -1,4 +1,3 @@
-//
 // Licensed to Apache Software Foundation (ASF) under one or more contributor
 // license agreements. See the NOTICE file distributed with
 // this work for additional information regarding copyright
@@ -15,6 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
+
 package trigger
 
 import (
diff --git a/commands/version.go b/commands/version.go
index 0b07316..3ac0062 100644
--- a/commands/version.go
+++ b/commands/version.go
@@ -14,7 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
-//
+
 package commands
 
 var version string
diff --git a/internal/components/trigger/http.go 
b/internal/components/trigger/http.go
index 3d62062..aa95bf2 100644
--- a/internal/components/trigger/http.go
+++ b/internal/components/trigger/http.go
@@ -15,6 +15,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
+
 package trigger
 
 import (
diff --git a/internal/components/verifier/funcs.go 
b/internal/components/verifier/funcs.go
index dc1fb09..f0ca3d4 100644
--- a/internal/components/verifier/funcs.go
+++ b/internal/components/verifier/funcs.go
@@ -31,7 +31,7 @@ import (
 
 // funcMap produces the custom function map.
 // Use this to pass the functions into the template engine:
-//     tpl := template.New("foo").Funcs(funcMap()))
+// tpl := template.New("foo").Funcs(funcMap()))
 func funcMap() template.FuncMap {
        fm := make(map[string]any, len(customFuncMap))
        for k, v := range customFuncMap {
diff --git a/internal/logger/log.go b/internal/logger/log.go
index 1c641e8..cdc6353 100644
--- a/internal/logger/log.go
+++ b/internal/logger/log.go
@@ -14,7 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
-//
+
 package logger
 
 import (

Reply via email to