Add a golangci-lint config and fix its findings: the OIDC state cookie gets the Secure flag on https deployments, and pool sizes are clamped before the int32 conversion.
42 lines
790 B
YAML
42 lines
790 B
YAML
# golangci-lint v2 configuration. Run with `make lint`.
|
|
version: "2"
|
|
|
|
run:
|
|
timeout: 5m
|
|
tests: true
|
|
|
|
linters:
|
|
default: standard # errcheck, govet, ineffassign, staticcheck, unused
|
|
enable:
|
|
- misspell
|
|
- unconvert
|
|
- unparam
|
|
- bodyclose
|
|
- noctx
|
|
- gosec
|
|
settings:
|
|
gosec:
|
|
excludes:
|
|
- G104 # unhandled errors are covered by errcheck
|
|
- G404 # math/rand is fine for round-robin routing
|
|
exclusions:
|
|
generated: lax
|
|
presets:
|
|
- comments
|
|
- std-error-handling
|
|
rules:
|
|
- path: _test\.go
|
|
linters:
|
|
- gosec
|
|
- noctx
|
|
- bodyclose
|
|
|
|
formatters:
|
|
enable:
|
|
- gofmt
|
|
- goimports
|
|
settings:
|
|
goimports:
|
|
local-prefixes:
|
|
- git.govekar.net/LovroG05/localmodelroutex
|