version: "2" linters: default: standard # errcheck, govet, staticcheck, unused, ineffassign enable: # --- general additions --- - gocritic - revive - errorlint - gosec - unconvert - misspell # --- HTTP / API-client (Sheets + Telegram) --- - bodyclose # unclosed response Body -> fd/conn leak - noctx # request built without context - errchkjson # unmarshalable types into json.Marshal - canonicalheader # non-canonical net/http.Header keys # --- context discipline (the real delta for this workload) --- - contextcheck # don't drop the inherited ctx for Background/TODO - fatcontext # nested/repeated ctx wrapping inside loops - containedctx # ctx stored in a struct field (anti-pattern) # --- uncomment if you persist bot state in SQL --- # - rowserrcheck # - sqlclosecheck settings: errcheck: check-type-assertions: true misspell: locale: US exclusions: rules: - path: _test\.go linters: - gosec - errcheck formatters: enable: - gofmt - goimports # - gofumpt