shad-go/.golangci.yml

84 lines
2.4 KiB
YAML
Raw Normal View History

2020-02-14 12:39:06 +00:00
# options for analysis running
run:
# default concurrency is a available CPU number
concurrency: 8
# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 5m
# exit code when at least one issue was found, default is 1
issues-exit-code: 1
# include test files or not, default is true
tests: true
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
format: colored-line-number
# print lines of code with issue, default is true
print-issued-lines: true
# print linter name in the end of issue text, default is true
print-linter-name: true
# all available settings of specific linters
linters-settings:
govet:
# report about shadowed variables
check-shadowing: true
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
2022-02-10 22:06:57 +00:00
stylecheck:
# https://staticcheck.io/docs/options#checks
checks: ["all", "-ST1018"]
2022-03-29 13:37:23 +00:00
# https://staticcheck.io/docs/options#initialisms
initialisms: [
"ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS",
"RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL",
"UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "CSV",
]
2020-02-14 12:39:06 +00:00
linters:
disable-all: true
enable:
- errcheck
- gofmt
2022-02-10 22:06:57 +00:00
- stylecheck
2020-02-14 12:39:06 +00:00
- gosimple
- govet
- ineffassign
2022-02-10 22:06:57 +00:00
- exportloopref
2020-02-14 12:39:06 +00:00
- staticcheck
- typecheck
- unconvert
issues:
# List of regexps of issue texts to exclude, empty list by default.
# But independently from this option we use default exclude patterns,
# it can be disabled by `exclude-use-default: false`. To list all
# excluded by default patterns execute `golangci-lint run --help`
exclude:
- Using the variable on range scope .* in function literal
# Independently from option `exclude` we use default exclude patterns,
# it can be disabled by this option. To list all
# excluded by default patterns execute `golangci-lint run --help`.
# Default value for this option is true.
exclude-use-default: true
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0