Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.24.2'
go-version: '1.25.3'
- name: Format
run: make fmt
- name: Lint
Expand Down
102 changes: 64 additions & 38 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,70 @@
run:
timeout: 10m
version: "2"
linters:
disable-all: true
default: none
enable:
- misspell
- ineffassign
- typecheck
# - varcheck
- unused
# - structcheck
# - deadcode
- gosimple
- goimports
- errcheck
- staticcheck
- stylecheck
- gosec
- asciicheck
- bodyclose
# - exportloopref
# - copyloopvar
- rowserrcheck
- unconvert
- makezero
- durationcheck
- errcheck
- gosec
- ineffassign
- makezero
- misspell
- prealloc

linters-settings:
staticcheck:
checks: ["S1002","S1004","S1007","S1009","S1010","S1012","S1019","S1020","S1021","S1024","S1030","SA2*","SA3*","SA4009","SA5*","SA6000","SA6001","SA6005", "-SA2002"]
stylecheck:
checks: ["-ST1003"]
issues:
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
- rowserrcheck
- makezero
- linters:
- gosec
text: "G115:"
- rowserrcheck
- staticcheck
- unconvert
- unused
settings:
staticcheck:
checks:
- -SA2002
- -ST1003
- S1002
- S1004
- S1007
- S1009
- S1010
- S1012
- S1019
- S1020
- S1021
- S1024
- S1030
- SA2*
- SA3*
- SA4009
- SA5*
- SA6000
- SA6001
- SA6005
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- errcheck
- gosec
- makezero
- rowserrcheck
path: _test\.go
- linters:
- gosec
text: 'G115:'
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ lint: tools/bin/golangci-lint
GO111MODULE=on tools/bin/golangci-lint run -v $$($(PACKAGE_DIRECTORIES)) --config .golangci.yml

tools/bin/golangci-lint:
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b ./tools/bin v1.64.5
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b ./tools/bin v2.4.0
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pingcap/ng-monitoring

go 1.24.6
go 1.25.3

require (
github.com/BurntSushi/toml v1.3.2
Expand Down