Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
go-version-file: './go.mod'

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v9
with:
version: v1.64.7
version: v2.15.0

fmt:
name: fmt
Expand Down
90 changes: 61 additions & 29 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,77 @@
version: "2"
run:
timeout: 10m
linters:
disable-all: true
default: none
enable:
- asciicheck
- bodyclose
- durationcheck
- errcheck
- goimports
- gosec
- gosimple
- ineffassign
- makezero
- prealloc
- predeclared
- rowserrcheck
- staticcheck
- stylecheck
- typecheck
- unused

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"]
gosec:
severity: "low"
confidence: "low"
excludes:
- G101
- G115
- G404
# exclude warnings of using crypto/sha1
- G505

issues:
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
- rowserrcheck
- makezero
settings:
gosec:
excludes:
- G101
- G115
- G404
# exclude warnings of using crypto/sha1
- G505
severity: low
confidence: low
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
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
@@ -1,4 +1,4 @@
GOLANGCI_VERSION=v1.64.7
GOLANGCI_VERSION=v2.15.0
COVERAGE=coverage.out

.PHONY: deps
Expand Down
2 changes: 1 addition & 1 deletion cmd/manifest/update_latest_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func main() {

latestTag = strings.TrimPrefix(latestTag, "v")
file = regexp.MustCompile("version=\".*\"").ReplaceAll(file, []byte(fmt.Sprintf("version=\"%s\"", latestTag)))
err = os.WriteFile("install.sh", file, 0600)
err = os.WriteFile("install.sh", file, 0600) //nolint:gosec // The path is the constant "install.sh".
if err != nil {
log.Fatalf("Failed to write install.sh file: %s", err.Error())
}
Expand Down
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/tidbcloud/tidbcloud-cli

go 1.24.0
go 1.27.3

require (
github.com/AlecAivazis/survey/v2 v2.3.6
Expand Down
Loading