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

alexstocks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git


The following commit(s) were added to refs/heads/main by this push:
     new a6338569 Fix golangci-lint (#813)
a6338569 is described below

commit a63385694d74148dd789d61014c61feb98d90fe0
Author: hokkine <[email protected]>
AuthorDate: Sun Mar 16 18:00:54 2025 +0800

    Fix golangci-lint (#813)
    
    * feat: Upgrade golangci-lint
    
    * fix: fix golangci-lint
    
    * fix: fix golangci-lint
    
    * fix: fix golangci-lint
    
    * fix: fix golangci-lint
    
    * fix: fix ci
    
    * fix: fix ci
    
    * fix: try to fix CI
    
    * fix: formatting go.mod
---
 .github/workflows/github-actions.yml |  2 +-
 .github/workflows/golangci-lint.yml  | 10 ++++------
 .golangci.yml                        | 31 +++++++------------------------
 go.mod                               |  4 +---
 4 files changed, 13 insertions(+), 34 deletions(-)

diff --git a/.github/workflows/github-actions.yml 
b/.github/workflows/github-actions.yml
index 2b4ac9e4..8a8cced4 100644
--- a/.github/workflows/github-actions.yml
+++ b/.github/workflows/github-actions.yml
@@ -18,7 +18,7 @@ jobs:
       # If you want to matrix build, you can append the following list.
       matrix:
         go_version:
-          - '1.20'
+          - '1.23'
         os:
           - ubuntu-latest
 
diff --git a/.github/workflows/golangci-lint.yml 
b/.github/workflows/golangci-lint.yml
index 18b7dc38..e2333192 100644
--- a/.github/workflows/golangci-lint.yml
+++ b/.github/workflows/golangci-lint.yml
@@ -21,7 +21,7 @@ jobs:
     strategy:
       matrix:
         golang:
-          - '1.20'
+          - '1.23'
     steps:
       - uses: actions/setup-go@v3
         with:
@@ -46,10 +46,8 @@ jobs:
           go mod tidy
 
       - name: golangci-lint
-        uses: golangci/[email protected]
+        uses: golangci/golangci-lint-action@v6
         with:
-          version: v1.54
+          # golangci-lint version
+          version: v1.61
           args: --timeout=10m
-          skip-go-installation: true
-          skip-pkg-cache: true
-          skip-build-cache: true
diff --git a/.golangci.yml b/.golangci.yml
index 6f214f44..e6f5dd00 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,25 +1,17 @@
 linters-settings:
-  govet:
-    check-shadowing: true
-  golint:
-    min-confidence: 0
   gocyclo:
     min-complexity: 10
-  maligned:
-    suggest-new: true
   dupl:
     threshold: 100
   goconst:
     min-len: 2
     min-occurrences: 2
   depguard:
-    list-type: blacklist
-    packages:
-      # logging is allowed only by logutils.Log, logrus
-      # is allowed to use only in logutils package
-      - github.com/sirupsen/logrus
-  misspell:
-    locale: US
+    rules:
+      main:
+        deny:
+          - pkg: "github.com/sirupsen/logrus"
+            desc: logging is allowed only by logutils.Log, logrus, is allowed 
to use only in logutils package
   lll:
     line-length: 140
   goimports:
@@ -35,17 +27,14 @@ linters-settings:
 linters:
   disable-all: true
   enable:
-    - govet
     - staticcheck
     - ineffassign
     - misspell
 
-run:
-  skip-dirs:
+issues:
+  exclude-dirs:
     - test/testdata_etc
     - pkg/golinters/goanalysis/(checker|passes)
-
-issues:
   exclude-rules:
     - text: "weak cryptographic primitive"
       linters:
@@ -54,10 +43,4 @@ issues:
         - staticcheck
       text: "SA1019:"
 
-# golangci.com configuration
-# https://github.com/golangci/golangci/wiki/Configuration
-service:
-  golangci-lint-version: 1.15.x # use the fixed version to not introduce new 
linters unexpectedly
-  prepare:
-    - echo "here I can run custom commands, but no preparation needed for this 
repo"
 
diff --git a/go.mod b/go.mod
index a5f6658b..21a91546 100644
--- a/go.mod
+++ b/go.mod
@@ -169,6 +169,4 @@ replace (
        go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.10.0
 )
 
-go 1.23.0
-
-toolchain go1.23.2
+go 1.23

Reply via email to