Update go dev dependencies (#22064)
`golangci-lint` [deprecated](https://github.com/golangci/golangci-lint/issues/1841) a bunch of linters, removed them.
This commit is contained in:
parent
cf27403e18
commit
0585ac3ac6
|
@ -1,28 +1,28 @@
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- gosimple
|
- bidichk
|
||||||
- deadcode
|
# - deadcode # deprecated - https://github.com/golangci/golangci-lint/issues/1841
|
||||||
- typecheck
|
- depguard
|
||||||
- govet
|
|
||||||
- errcheck
|
|
||||||
- staticcheck
|
|
||||||
- unused
|
|
||||||
- structcheck
|
|
||||||
- varcheck
|
|
||||||
- dupl
|
- dupl
|
||||||
|
- errcheck
|
||||||
|
- gocritic
|
||||||
# - gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
|
# - gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
|
||||||
- gofmt
|
- gofmt
|
||||||
- gocritic
|
|
||||||
- bidichk
|
|
||||||
- ineffassign
|
|
||||||
- revive
|
|
||||||
- gofumpt
|
- gofumpt
|
||||||
- depguard
|
- gosimple
|
||||||
|
- govet
|
||||||
|
- ineffassign
|
||||||
- nakedret
|
- nakedret
|
||||||
- unconvert
|
|
||||||
- wastedassign
|
|
||||||
- nolintlint
|
- nolintlint
|
||||||
|
- revive
|
||||||
|
- staticcheck
|
||||||
|
# - structcheck # deprecated - https://github.com/golangci/golangci-lint/issues/1841
|
||||||
- stylecheck
|
- stylecheck
|
||||||
|
- typecheck
|
||||||
|
- unconvert
|
||||||
|
- unused
|
||||||
|
# - varcheck # deprecated - https://github.com/golangci/golangci-lint/issues/1841
|
||||||
|
# - wastedassign # disabled - https://github.com/golangci/golangci-lint/issues/2649
|
||||||
enable-all: false
|
enable-all: false
|
||||||
disable-all: true
|
disable-all: true
|
||||||
fast: false
|
fast: false
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -26,15 +26,15 @@ COMMA := ,
|
||||||
XGO_VERSION := go-1.19.x
|
XGO_VERSION := go-1.19.x
|
||||||
|
|
||||||
AIR_PACKAGE ?= github.com/cosmtrek/air@v1.40.4
|
AIR_PACKAGE ?= github.com/cosmtrek/air@v1.40.4
|
||||||
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.5.0
|
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.6.0
|
||||||
ERRCHECK_PACKAGE ?= github.com/kisielk/errcheck@v1.6.1
|
ERRCHECK_PACKAGE ?= github.com/kisielk/errcheck@v1.6.2
|
||||||
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.3.1
|
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.4.0
|
||||||
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.0
|
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
|
||||||
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.10
|
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.10
|
||||||
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4
|
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4
|
||||||
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.0
|
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.3
|
||||||
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
||||||
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.3.0
|
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.5.0
|
||||||
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@latest
|
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@latest
|
||||||
|
|
||||||
DOCKER_IMAGE ?= gitea/gitea
|
DOCKER_IMAGE ?= gitea/gitea
|
||||||
|
|
|
@ -21,8 +21,10 @@ type contextKey struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// enginedContextKey is a context key. It is used with context.Value() to get the current Engined for the context
|
// enginedContextKey is a context key. It is used with context.Value() to get the current Engined for the context
|
||||||
var enginedContextKey = &contextKey{"engined"}
|
var (
|
||||||
var _ Engined = &Context{}
|
enginedContextKey = &contextKey{"engined"}
|
||||||
|
_ Engined = &Context{}
|
||||||
|
)
|
||||||
|
|
||||||
// Context represents a db context
|
// Context represents a db context
|
||||||
type Context struct {
|
type Context struct {
|
||||||
|
|
|
@ -239,7 +239,7 @@ func (counts runeCountType) needsEscape() bool {
|
||||||
type runeType int
|
type runeType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
basicASCIIRuneType runeType = iota //nolint // <- This is technically deadcode but its self-documenting so it should stay
|
basicASCIIRuneType runeType = iota // <- This is technically deadcode but its self-documenting so it should stay
|
||||||
brokenRuneType
|
brokenRuneType
|
||||||
nonBasicASCIIRuneType
|
nonBasicASCIIRuneType
|
||||||
ambiguousRuneType
|
ambiguousRuneType
|
||||||
|
|
|
@ -21,8 +21,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// https://peps.python.org/pep-0426/#name
|
// https://peps.python.org/pep-0426/#name
|
||||||
var normalizer = strings.NewReplacer(".", "-", "_", "-")
|
var (
|
||||||
var nameMatcher = regexp.MustCompile(`\A(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\.\-_]*[a-zA-Z0-9])\z`)
|
normalizer = strings.NewReplacer(".", "-", "_", "-")
|
||||||
|
nameMatcher = regexp.MustCompile(`\A(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\.\-_]*[a-zA-Z0-9])\z`)
|
||||||
|
)
|
||||||
|
|
||||||
// https://peps.python.org/pep-0440/#appendix-b-parsing-version-strings-with-regular-expressions
|
// https://peps.python.org/pep-0440/#appendix-b-parsing-version-strings-with-regular-expressions
|
||||||
var versionMatcher = regexp.MustCompile(`\Av?` +
|
var versionMatcher = regexp.MustCompile(`\Av?` +
|
||||||
|
|
Loading…
Reference in New Issue