hatch-surf/.golangci.yml
Riley Zhang 6f03ff2465 Add linting, formatting, and test infrastructure for Phase 1
- Add .golangci.yml with sensible linting rules
- Add Makefile with test, lint, fmt, vet, build targets
- Enhance CI pipeline with Go formatting check and golangci-lint job
- Create shared testutil.FakeRepository for handler tests
- Refactor handler tests to use shared FakeRepository
- Add data/ and coverage.out to .gitignore

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-24 04:59:52 +02:00

57 lines
1.1 KiB
YAML

linters:
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
- gofmt
- misspell
- unconvert
- unparam
- prealloc
- gocritic
- revive
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
govet:
check-shadowing: true
revive:
rules:
- name: blank-imports
- name: context-as-argument
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: range
- name: receiver-naming
- name: indent-error-flow
- name: superfluous-else
- name: unreachable-code
- name: redefines-builtin-id
issues:
exclude-rules:
# Exclude some linters from running on test files
- path: _test\.go
linters:
- errcheck
- gocritic
- unparam
# Exclude known issues in test files
- path: _test\.go
text: "func name"
run:
timeout: 5m
modules-download-mode: readonly