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/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
go-version: stable
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6.5.0
uses: golangci/golangci-lint-action@v8.0.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.64.5
version: v2.4.0

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
132 changes: 75 additions & 57 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,86 @@
# See https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
# See https://golangci-lint.run/docs/linters/configuration/
version: "2"
run:
tests: true

linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
gocyclo:
min-complexity: 20
dupl:
threshold: 100
misspell:
locale: US
unparam:
check-exported: true

linters:
enable-all: true
default: all
disable:
- err113
- cyclop
- musttag
- intrange
- wsl_v5
- noctx
- funcorder
- embeddedstructfieldcheck
- noinlineerr
- copyloopvar
- lll
- gochecknoglobals
- wrapcheck
- paralleltest
- cyclop
- depguard
- dupword
- err113
- errname
- exhaustruct
- forbidigo
- forcetypeassert
- varnamelen
- tagliatelle
- errname
- gochecknoglobals
- intrange
- ireturn
- exhaustruct
- lll
- mnd
- musttag
- nonamedreturns
- testableexamples
- dupword
- depguard
- paralleltest
- recvcheck
- tagalign
- mnd
- tagliatelle
- testableexamples
- testifylint
- recvcheck

issues:
exclude-use-default: false
exclude-rules:
- linters:
- wsl
- wastedassign
- ineffassign
- mnd
- goconst
- noctx
- funlen
- dupl
- unused
- unparam
path: "_test.go"
- linters:
- errcheck # Error checking omitted for brevity.
- gosec
path: "example_"
- linters:
- revive
text: "unused-parameter: parameter"

- varnamelen
- wrapcheck
settings:
dupl:
threshold: 100
errcheck:
check-type-assertions: true
check-blank: true
gocyclo:
min-complexity: 20
misspell:
locale: US
unparam:
check-exported: true
exclusions:
generated: lax
rules:
- linters:
- dupl
- funlen
- goconst
- ineffassign
- mnd
- noctx
- unparam
- unused
- wastedassign
- wsl
path: _test.go
- linters:
- errcheck
- gosec
path: example_
- linters:
- revive
text: 'unused-parameter: parameter'
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- gofumpt
- 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_LINT_VERSION := "v1.64.5" # Optional configuration to pinpoint golangci-lint version.
#GOLANGCI_LINT_VERSION := "v2.4.0" # Optional configuration to pinpoint golangci-lint version.

# The head of Makefile determines location of dev-go to include standard targets.
GO ?= go
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/Masterminds/squirrel v1.5.4
github.com/bool64/ctxd v1.2.1
github.com/bool64/dev v0.2.40
github.com/bool64/dev v0.2.41
github.com/jmoiron/sqlx v1.4.0
github.com/stretchr/testify v1.8.2
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8
github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10=
github.com/bool64/ctxd v1.2.1 h1:hARFteq0zdn4bwfmxLhak3fXFuvtJVKDH2X29VV/2ls=
github.com/bool64/ctxd v1.2.1/go.mod h1:ZG6QkeGVLTiUl2mxPpyHmFhDzFZCyocr9hluBV3LYuc=
github.com/bool64/dev v0.2.40 h1:LUSD+Aq+WB3KwVntqXstevJ0wB12ig1bEgoG8ZafsZU=
github.com/bool64/dev v0.2.40/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg=
github.com/bool64/dev v0.2.41 h1:aic7tEGMkqyH7kckksR1ddagAZtlSIFHvYBOsqn01+U=
github.com/bool64/dev v0.2.41/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
2 changes: 1 addition & 1 deletion misc/pg_create_table.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package misc contains miscellaneous helpers.
package misc
package misc //nolint:revive

import (
"database/sql"
Expand Down
2 changes: 1 addition & 1 deletion storage_go1.18.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func Table[V any](storage *Storage, tableName string) StorageOf[V] {
}

ar.Referencer = storage.MakeReferencer()
ar.Referencer.AddTableAlias(ar.R, tableName)
ar.AddTableAlias(ar.R, tableName)

return ar
}
Expand Down
Loading