Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
matrix:
golang:
- 1.20
- 1.25.10

services:
mysql:
Expand All @@ -51,7 +51,7 @@ jobs:
- name: "set up go"
uses: actions/setup-go@v3
with:
go-version: 1.20.14
go-version: 1.25.10


# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,22 @@ jobs:
strategy:
matrix:
golang:
- 1.20.0
- 1.25.10

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: "set up go"
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.20.0
go-version: 1.25.10

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: "checkout ${{ github.ref }}"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "golang ci lint"
uses: golangci/golangci-lint-action@v3.1.0
uses: golangci/golangci-lint-action@v8
with:
version: v1.51.0
version: v2.4.0
args: --timeout=10m
skip-cache: true
skip-pkg-cache: true
4 changes: 2 additions & 2 deletions .github/workflows/integrate-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:
strategy:
matrix:
golang:
- 1.20
- 1.25.10

steps:

- name: "set up go"
uses: actions/setup-go@v3
with:
go-version: 1.20.14
go-version: 1.25.10

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: "checkout ${{ github.ref }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.25.10"
- name: Check Dependencies Licenses
run: |
mkdir -p ./dist-material/
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ jobs:
strategy:
matrix:
golang:
- 1.20.14
- 1.25.10

steps:
- name: "Set up Go"
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang }}

- name: "Checkout code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

- name: "Cache dependencies"
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: "${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}"
Expand Down
129 changes: 61 additions & 68 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,79 +14,72 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

linters-settings:
govet:
shadow: 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
lll:
line-length: 140
goimports:
local-prefixes: github.com/golangci/golangci-lint
gocritic:
enabled-tags:
- performance
- style
- experimental
disabled-checks:
- wrapperFunc

version: "2"
linters:
disable-all: true
default: none
enable:
- asciicheck
- bodyclose
- durationcheck
- govet
- staticcheck
- ineffassign
- misspell
- asciicheck
- bodyclose
- rowserrcheck
- gofmt
- durationcheck
- sqlclosecheck

run:

issues:
exclude-dirs:
- test/testdata_etc
- pkg/golinters/goanalysis/(checker|passes)
exclude-rules:
- text: "weak cryptographic primitive"
linters:
- gosec
- linters:
- staticcheck
text: "SA1019:"
- path: _test\.go
linters:
- errcheck
- gosec
- rowserrcheck
- govet

- staticcheck
settings:
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 2
gocritic:
disabled-checks:
- wrapperFunc
enabled-tags:
- performance
- style
- experimental
gocyclo:
min-complexity: 10
lll:
line-length: 140
misspell:
locale: US
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- gosec
text: weak cryptographic primitive
- linters:
- staticcheck
text: 'SA1019:'
- linters:
- errcheck
- gosec
- govet
- rowserrcheck
path: _test\.go
paths:
- third_party$
- builtin$
formatters:
enable:
- gofmt
settings:
goimports:
local-prefixes:
- seata.apache.org/seata-go
exclusions:
generated: lax
paths:
- third_party$
- builtin$
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.57.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"

# https://github.com/golangci/golangci/wiki/Configuration
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
module seata.apache.org/seata-go/v2

go 1.20
go 1.25

require (
dubbo.apache.org/dubbo-go/v3 v3.0.4
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/apache/dubbo-getty v1.5.0
github.com/arana-db/parser v0.2.17
github.com/bluele/gcache v0.0.2
github.com/dsnet/compress v0.0.1
github.com/dubbogo/gost v1.13.2
github.com/gin-gonic/gin v1.9.1
github.com/go-sql-driver/mysql v1.6.0
github.com/go-sql-driver/mysql v1.7.1
github.com/goccy/go-json v0.10.2
github.com/golang/mock v1.6.0
github.com/google/cel-go v0.18.0
github.com/google/uuid v1.3.0
github.com/mattn/go-sqlite3 v1.14.19
github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/pierrec/lz4/v4 v4.1.17
github.com/pingcap/tidb/pkg/parser v0.0.0-20260413061245-ae18096e0237
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.2
github.com/prometheus/common v0.32.1
github.com/sijms/go-ora/v2 v2.5.17
github.com/stretchr/testify v1.8.3
go.uber.org/atomic v1.9.0
github.com/stretchr/testify v1.8.4
go.uber.org/atomic v1.11.0
go.uber.org/zap v1.27.0
golang.org/x/sync v0.11.0
google.golang.org/grpc v1.57.0
Expand Down Expand Up @@ -83,7 +82,8 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect
github.com/pingcap/errors v0.11.5-0.20240311024730-e056997136bb // indirect
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_model v0.3.0 // indirect
Expand All @@ -98,13 +98,13 @@ require (
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.6 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/sourcemap.v1 v1.0.5 // indirect
)

Expand All @@ -115,7 +115,7 @@ require (
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/pingcap/log v0.0.0-20210906054005-afc726e70354 // indirect
github.com/pingcap/log v1.1.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
Expand Down
Loading
Loading