6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-04 16:49:43 +00:00
Files
git-get/.golangci.yml
2025-08-24 17:42:59 +02:00

55 lines
1.9 KiB
YAML

version: "2"
run:
timeout: 1m
formatters:
enable:
- gci
- gofmt
- goimports
linters:
default: all
disable:
- depguard # We don't have any packages we need to block
- exhaustruct # Too pedantic and impractical. Explicitly setting all struct values goes against Go's zero-value philosophy
- forbidigo # Not suitable for CLI apps where printing to stdout is fine
- gochecknoglobals # It's too strict and doesn't distinguish between "bad" globals (mutable shared state) and "good" globals (immutable configuration)
- godox # TODO: enable it and handle all the remaning TODOs
- paralleltest # Tests are fast already and paralellizing them adds complexity
- testpackage # TODO: renable it and refactor tests into separate packages
- unparam # Impractical, it flags functions that are designed to be general-purpose, but happen to only be used with specific values currently
- wsl # We use wsl_v5 instead
- wrapcheck # Adds too much bloat, many of the errors are contextual enough and don't need wrapping
settings:
goconst:
ignore-string-values:
- "get"
- "list"
lll:
line-length: 180
exclusions:
# Typical presets to exclude: https://golangci-lint.run/docs/linters/false-positives/#exclusion-presets
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- path: _test.go
linters:
- dupl # We don't mind duplicated code in tests. It helps with clarity
- varnamelen # We don't mind short var names in tests.
- revive # Complains too much about unused-params, but they help with tests readibility
- funlen # We don't mind long functions in tests
- path: test/
linters:
- dupl
- varnamelen