2026-03-11 20:07:26 +08:00
|
|
|
# golangci-lint configuration for Atlas for Mac
|
2026-01-08 14:28:03 +08:00
|
|
|
# https://golangci-lint.run/usage/configuration/
|
|
|
|
|
|
2026-01-08 10:14:07 +02:00
|
|
|
version: "2"
|
2026-01-08 15:26:35 +08:00
|
|
|
|
2026-01-08 14:28:03 +08:00
|
|
|
run:
|
|
|
|
|
timeout: 5m
|
|
|
|
|
# Only lint Go code in cmd directory
|
|
|
|
|
modules-download-mode: readonly
|
|
|
|
|
|
|
|
|
|
linters:
|
|
|
|
|
enable:
|
|
|
|
|
# Default linters
|
|
|
|
|
- govet
|
|
|
|
|
- staticcheck
|
2026-01-08 15:58:50 +08:00
|
|
|
- errcheck
|
2026-01-08 14:28:03 +08:00
|
|
|
- ineffassign
|
|
|
|
|
- unused
|
2026-03-05 14:46:12 +02:00
|
|
|
# Additional linters
|
|
|
|
|
- modernize
|
2026-01-08 14:28:03 +08:00
|
|
|
|
2026-01-08 10:14:07 +02:00
|
|
|
settings:
|
|
|
|
|
govet:
|
|
|
|
|
enable-all: true
|
|
|
|
|
disable:
|
|
|
|
|
- shadow
|
|
|
|
|
- fieldalignment # struct field alignment optimization is noisy
|
|
|
|
|
errcheck:
|
|
|
|
|
exclude-functions:
|
|
|
|
|
- (io.Closer).Close
|
|
|
|
|
- (*os/exec.Cmd).Run
|
|
|
|
|
- (*os/exec.Cmd).Start
|
|
|
|
|
staticcheck:
|
|
|
|
|
checks: ["all", "-QF1003", "-SA9003"]
|
2026-01-08 14:28:03 +08:00
|
|
|
|
2026-01-08 10:14:07 +02:00
|
|
|
exclusions:
|
|
|
|
|
rules:
|
|
|
|
|
# Ignore certain patterns in test files
|
|
|
|
|
- path: _test\.go
|
|
|
|
|
linters:
|
|
|
|
|
- errcheck
|
|
|
|
|
# Ignore errors from os.Remove in cleanup code
|
|
|
|
|
- text: "os.Remove"
|
|
|
|
|
linters:
|
|
|
|
|
- errcheck
|