This is an automated email from the ASF dual-hosted git repository.
xuetaoli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-go-extensions.git
The following commit(s) were added to refs/heads/main by this push:
new 4cc8c32 ci: fix lint config to v2 format (#13)
4cc8c32 is described below
commit 4cc8c3251360914b8ed63dbd572a263796099a96
Author: Zecheng Zhu <[email protected]>
AuthorDate: Mon Mar 23 12:00:59 2026 +0800
ci: fix lint config to v2 format (#13)
---
.golangci.yml | 98 ++++++++++++++++++++++++++++++++++++-----------------------
1 file changed, 60 insertions(+), 38 deletions(-)
diff --git a/.golangci.yml b/.golangci.yml
index 98900aa..b890c7b 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,45 +1,67 @@
version: "2"
-linters-settings:
- gocyclo:
- min-complexity: 10
- dupl:
- threshold: 100
- goconst:
- min-len: 2
- min-occurrences: 2
- depguard:
- 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:
- local-prefixes: github.com/apache/dubbo-go-extensions
- gocritic:
- enabled-tags:
- - performance
- - style
- - experimental
- disabled-checks:
- - wrapperFunc
+
+run:
+ timeout: 20m
+
+issues:
+ new: true
linters:
- disable-all: true
+ default: none
enable:
- - staticcheck
+ - govet
- ineffassign
- misspell
+ - staticcheck
+ - depguard
-issues:
- exclude-dirs:
- - test/testdata_etc
- - pkg/golinters/goanalysis/(checker|passes)
- exclude-rules:
- - text: "weak cryptographic primitive"
- linters:
- - gosec
- - linters:
- - staticcheck
- text: "SA1019:"
+ settings:
+ depguard:
+ rules:
+ main:
+ deny:
+ - pkg: github.com/sirupsen/logrus
+ desc: logging is allowed only by logutils.Log, logrus is allowed
only in logutils package
+
+ dupl:
+ threshold: 100
+
+ goconst:
+ min-len: 2
+ min-occurrences: 2
+
+ gocritic:
+ disabled-checks:
+ - wrapperFunc
+ enabled-tags:
+ - performance
+ - style
+ - experimental
+
+ lll:
+ line-length: 140
+
+ exclusions:
+ rules:
+ - linters:
+ - gosec
+ text: weak cryptographic primitive
+ - linters:
+ - staticcheck
+ text: "SA1019:"
+ paths:
+ - test/testdata_etc
+ - pkg/golinters/goanalysis/(checker|passes)
+
+formatters:
+ enable:
+ - gofmt
+ settings:
+ gofmt:
+ simplify: true
+ rewrite-rules:
+ - pattern: interface{}
+ replacement: any
+ goimports:
+ local-prefixes:
+ - github.com/golangci/golangci-lint
\ No newline at end of file