6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-04 09:51:46 +00:00
Files
git-get/.golangci.yml
Grzegorz Dlugoszewski 152e91444b Remove redundant steps from CI workflow
- go mod verify is not needed when go.sum is checked in. go build and go
test will automatically verify checksums
- go mod download is handled by the setup-go action already
2025-08-25 20:12:49 +02:00

55 lines
2.1 KiB
YAML

version: "2"
run:
timeout: 1m
formatters:
enable:
- 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
- mnd # Impractical. We deal with numbers like file permissions here, it's much clearer to see them explicitly.
- noinlineerr # Impractical. Inline error handling is a common and idiomatic practice
- testpackage # Impractical for CLI apps. This linter is more valuable for libraries to ensure a clean public API.
- 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