chore: upgrade Go, golangci-lint and CI deps (#5)

Upgrade main development to use Go 1.23, while still running CI against 1.20 and later.

Also update golangci-lint to v2.
This commit is contained in:
2025-06-11 02:12:26 +01:00
committed by GitHub
parent 6cec7b8627
commit c3408f0cfb
4 changed files with 83 additions and 72 deletions

View File

@@ -1,29 +1,10 @@
linters-settings:
funlen:
lines: 100
statements: 150
goconst:
min-occurrences: 5
ignore-strings: "^ format $"
gocyclo:
min-complexity: 20
golint:
min-confidence: 0
govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment
lll:
line-length: 80
tab-width: 4
maligned:
suggest-new: true
misspell:
locale: US
---
version: "2"
run:
modules-download-mode: readonly
allow-parallel-runners: true
linters:
disable-all: true
default: none
enable:
- asciicheck
- bodyclose
@@ -31,18 +12,14 @@ linters:
- errcheck
- errorlint
- exhaustive
- exportloopref
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- godot
- gofumpt
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- importas
- ineffassign
@@ -60,33 +37,63 @@ linters:
- sqlclosecheck
- staticcheck
- tparallel
- typecheck
- unconvert
- unparam
- unused
- wastedassign
- whitespace
issues:
exclude-rules:
- path: "_test\\.go"
linters:
- funlen
- dupl
- source: "^//go:generate "
linters:
- lll
- source: "`json:"
linters:
- lll
- source: "`xml:"
linters:
- lll
- source: "`yaml:"
linters:
- lll
run:
timeout: 2m
allow-parallel-runners: true
modules-download-mode: readonly
settings:
funlen:
lines: 100
statements: 150
goconst:
min-occurrences: 5
gocyclo:
min-complexity: 20
govet:
disable:
- fieldalignment
enable-all: true
lll:
line-length: 80
tab-width: 4
misspell:
locale: US
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- dupl
- funlen
path: _test\.go
- linters:
- lll
source: "^//go:generate "
- linters:
- lll
source: "`json:"
- linters:
- lll
source: "`xml:"
- linters:
- lll
source: "`yaml:"
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofumpt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$