chore(deps): update golangci/golangci-lint to v1.57 (#32)
Reviewed-on: twhelp/corev3#32
This commit is contained in:
parent
7ba172f7a4
commit
4b828575e8
|
@ -59,6 +59,8 @@ linters:
|
||||||
- revive
|
- revive
|
||||||
- gomnd
|
- gomnd
|
||||||
- forbidigo
|
- forbidigo
|
||||||
|
- copyloopvar
|
||||||
|
- intrange
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
gocyclo:
|
gocyclo:
|
||||||
|
@ -80,6 +82,7 @@ linters-settings:
|
||||||
govet:
|
govet:
|
||||||
enable:
|
enable:
|
||||||
- asmdecl
|
- asmdecl
|
||||||
|
- appends
|
||||||
- assign
|
- assign
|
||||||
- atomic
|
- atomic
|
||||||
- atomicalign
|
- atomicalign
|
||||||
|
@ -114,6 +117,8 @@ linters-settings:
|
||||||
- unsafeptr
|
- unsafeptr
|
||||||
- unusedresult
|
- unusedresult
|
||||||
- unusedwrite
|
- unusedwrite
|
||||||
|
- slog
|
||||||
|
- defers
|
||||||
testifylint:
|
testifylint:
|
||||||
enable-all: true
|
enable-all: true
|
||||||
sloglint:
|
sloglint:
|
||||||
|
@ -478,9 +483,18 @@ linters-settings:
|
||||||
disabled: false
|
disabled: false
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value
|
||||||
- name: waitgroup-by-value
|
- name: waitgroup-by-value
|
||||||
severity: warning
|
severity: error
|
||||||
|
disabled: false
|
||||||
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unchecked-type-assertion
|
||||||
|
- name: unchecked-type-assertion
|
||||||
|
severity: error
|
||||||
|
disabled: false
|
||||||
|
arguments:
|
||||||
|
- acceptIgnoredAssertionResult: true
|
||||||
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#use-any
|
||||||
|
- name: use-any
|
||||||
|
severity: error
|
||||||
disabled: false
|
disabled: false
|
||||||
|
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
|
|
|
@ -6,7 +6,7 @@ repos:
|
||||||
stages: [commit-msg]
|
stages: [commit-msg]
|
||||||
additional_dependencies: ["@commitlint/config-conventional"]
|
additional_dependencies: ["@commitlint/config-conventional"]
|
||||||
- repo: https://github.com/golangci/golangci-lint
|
- repo: https://github.com/golangci/golangci-lint
|
||||||
rev: v1.56.2
|
rev: v1.57.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: golangci-lint
|
- id: golangci-lint
|
||||||
- repo: https://github.com/hadolint/hadolint
|
- repo: https://github.com/hadolint/hadolint
|
||||||
|
|
|
@ -42,7 +42,7 @@ steps:
|
||||||
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
|
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
image: golangci/golangci-lint:v1.56
|
image: golangci/golangci-lint:v1.57
|
||||||
pull: true
|
pull: true
|
||||||
depends_on:
|
depends_on:
|
||||||
- generate
|
- generate
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -16,7 +16,7 @@ install-git-hooks:
|
||||||
.PHONY: install-golangci-lint
|
.PHONY: install-golangci-lint
|
||||||
install-golangci-lint:
|
install-golangci-lint:
|
||||||
@echo "Installing github.com/golangci/golangci-lint..."
|
@echo "Installing github.com/golangci/golangci-lint..."
|
||||||
@(test -f $(GOLANGCI_LINT_PATH) && echo "github.com/golangci/golangci-lint is already installed. Skipping...") || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.56.2
|
@(test -f $(GOLANGCI_LINT_PATH) && echo "github.com/golangci/golangci-lint is already installed. Skipping...") || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.57.1
|
||||||
|
|
||||||
.PHONY: install-oapi-codegen
|
.PHONY: install-oapi-codegen
|
||||||
install-oapi-codegen:
|
install-oapi-codegen:
|
||||||
|
|
|
@ -84,11 +84,11 @@ func (a cursorPaginationApplier) apply(q *bun.SelectQuery) *bun.SelectQuery {
|
||||||
// based on https://github.com/prisma/prisma/issues/19159#issuecomment-1713389245
|
// based on https://github.com/prisma/prisma/issues/19159#issuecomment-1713389245
|
||||||
|
|
||||||
return q.WhereGroup(" OR ", func(q *bun.SelectQuery) *bun.SelectQuery {
|
return q.WhereGroup(" OR ", func(q *bun.SelectQuery) *bun.SelectQuery {
|
||||||
for i := 0; i < dataLen; i++ {
|
for i := range dataLen {
|
||||||
q.WhereGroup(" OR ", func(q *bun.SelectQuery) *bun.SelectQuery {
|
q.WhereGroup(" OR ", func(q *bun.SelectQuery) *bun.SelectQuery {
|
||||||
current := a.data[i]
|
current := a.data[i]
|
||||||
|
|
||||||
for j := 0; j < i; j++ {
|
for j := range i {
|
||||||
prev := a.data[j]
|
prev := a.data[j]
|
||||||
q = q.Where("? = ?", prev.column, prev.value)
|
q = q.Where("? = ?", prev.column, prev.value)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package buntest
|
||||||
// TestingTB is a subset of the API provided by both *testing.T and *testing.B.
|
// TestingTB is a subset of the API provided by both *testing.T and *testing.B.
|
||||||
type TestingTB interface {
|
type TestingTB interface {
|
||||||
Helper()
|
Helper()
|
||||||
Errorf(format string, args ...interface{})
|
Errorf(format string, args ...any)
|
||||||
FailNow()
|
FailNow()
|
||||||
Cleanup(f func())
|
Cleanup(f func())
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package domaintest
|
||||||
// TestingTB is a subset of the API provided by both *testing.T and *testing.B.
|
// TestingTB is a subset of the API provided by both *testing.T and *testing.B.
|
||||||
type TestingTB interface {
|
type TestingTB interface {
|
||||||
Helper()
|
Helper()
|
||||||
Errorf(format string, args ...interface{})
|
Errorf(format string, args ...any)
|
||||||
FailNow()
|
FailNow()
|
||||||
Cleanup(f func())
|
Cleanup(f func())
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package watermilltest
|
||||||
// TestingTB is a subset of the API provided by both *testing.T and *testing.B.
|
// TestingTB is a subset of the API provided by both *testing.T and *testing.B.
|
||||||
type TestingTB interface {
|
type TestingTB interface {
|
||||||
Helper()
|
Helper()
|
||||||
Errorf(format string, args ...interface{})
|
Errorf(format string, args ...any)
|
||||||
FailNow()
|
FailNow()
|
||||||
Cleanup(f func())
|
Cleanup(f func())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue