tercul-backend/.golangci.yml
google-labs-jules[bot] 53aa4d0344
Security Hardening and GraphQL Caching (#69)
* feat: add security middleware, graphql apq, and improved linting

- Add RateLimit, RequestValidation, and CORS middleware.
- Configure middleware chain in API server.
- Implement Redis cache for GraphQL Automatic Persisted Queries.
- Add .golangci.yml and fix linting issues (shadowing, timeouts).

* feat: security, caching and linting config

- Fix .golangci.yml config for govet shadow check
- (Previous changes: Security middleware, GraphQL APQ, Linting fixes)

* fix: resolve remaining lint errors

- Fix unhandled errors in tests (errcheck)
- Define constants for repeated strings (goconst)
- Suppress high complexity warnings with nolint:gocyclo
- Fix integer overflow warnings (gosec)
- Add package comments
- Split long lines (lll)
- Rename Analyse -> Analyze (misspell)
- Fix naked returns and unused params

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-12-01 00:14:22 +01:00

61 lines
896 B
YAML

run:
timeout: 5m
tests: true
linters-settings:
govet:
enable:
- shadow
gocyclo:
min-complexity: 15
goconst:
min-len: 2
min-occurrences: 3
misspell:
locale: US
lll:
line-length: 140
goimports:
local-prefixes: tercul
gocritic:
enabled-tags:
- diagnostic
- performance
- style
disabled-checks:
- wrapperFunc
- ifElseChain
- octalLiteral
linters:
disable-all: true
enable:
- bodyclose
- errcheck
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- noctx
- nolintlint
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0