chore(deps): update golangci/golangci-lint to v1.57 (#32)
ci/woodpecker/push/govulncheck Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details

Reviewed-on: twhelp/corev3#32
This commit is contained in:
Dawid Wysokiński 2024-03-21 05:56:01 +00:00
parent 7ba172f7a4
commit 4b828575e8
8 changed files with 24 additions and 10 deletions

View File

@ -59,6 +59,8 @@ linters:
- revive
- gomnd
- forbidigo
- copyloopvar
- intrange
linters-settings:
gocyclo:
@ -80,6 +82,7 @@ linters-settings:
govet:
enable:
- asmdecl
- appends
- assign
- atomic
- atomicalign
@ -114,6 +117,8 @@ linters-settings:
- unsafeptr
- unusedresult
- unusedwrite
- slog
- defers
testifylint:
enable-all: true
sloglint:
@ -478,9 +483,18 @@ linters-settings:
disabled: false
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#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
issues:
exclude-rules:

View File

@ -6,7 +6,7 @@ repos:
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
- repo: https://github.com/golangci/golangci-lint
rev: v1.56.2
rev: v1.57.1
hooks:
- id: golangci-lint
- repo: https://github.com/hadolint/hadolint

View File

@ -42,7 +42,7 @@ steps:
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
lint:
image: golangci/golangci-lint:v1.56
image: golangci/golangci-lint:v1.57
pull: true
depends_on:
- generate

View File

@ -16,7 +16,7 @@ install-git-hooks:
.PHONY: install-golangci-lint
install-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
install-oapi-codegen:

View File

@ -84,11 +84,11 @@ func (a cursorPaginationApplier) apply(q *bun.SelectQuery) *bun.SelectQuery {
// based on https://github.com/prisma/prisma/issues/19159#issuecomment-1713389245
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 {
current := a.data[i]
for j := 0; j < i; j++ {
for j := range i {
prev := a.data[j]
q = q.Where("? = ?", prev.column, prev.value)
}

View File

@ -3,7 +3,7 @@ package buntest
// TestingTB is a subset of the API provided by both *testing.T and *testing.B.
type TestingTB interface {
Helper()
Errorf(format string, args ...interface{})
Errorf(format string, args ...any)
FailNow()
Cleanup(f func())
}

View File

@ -3,7 +3,7 @@ package domaintest
// TestingTB is a subset of the API provided by both *testing.T and *testing.B.
type TestingTB interface {
Helper()
Errorf(format string, args ...interface{})
Errorf(format string, args ...any)
FailNow()
Cleanup(f func())
}

View File

@ -3,7 +3,7 @@ package watermilltest
// TestingTB is a subset of the API provided by both *testing.T and *testing.B.
type TestingTB interface {
Helper()
Errorf(format string, args ...interface{})
Errorf(format string, args ...any)
FailNow()
Cleanup(f func())
}