2019-10-19 14:50:13 +00:00
|
|
|
linters:
|
2024-05-14 19:54:08 +00:00
|
|
|
enable-all: true
|
|
|
|
disable:
|
|
|
|
- cyclop
|
|
|
|
- depguard
|
|
|
|
- dupl
|
|
|
|
- err113
|
2024-09-10 22:34:10 +00:00
|
|
|
- execinquery
|
2024-05-14 19:54:08 +00:00
|
|
|
- exhaustive
|
|
|
|
- exhaustruct
|
2024-08-29 22:26:15 +00:00
|
|
|
- exportloopref
|
2024-05-14 19:54:08 +00:00
|
|
|
- fatcontext
|
|
|
|
- funlen
|
|
|
|
- gochecknoglobals
|
|
|
|
- gocognit
|
|
|
|
- goconst
|
|
|
|
- gocyclo
|
2024-10-12 16:09:05 +00:00
|
|
|
- godot
|
2024-09-10 22:34:10 +00:00
|
|
|
- gomnd
|
2024-10-06 22:15:54 +00:00
|
|
|
- paralleltest
|
2024-05-14 19:54:08 +00:00
|
|
|
- lll
|
2024-09-10 22:34:10 +00:00
|
|
|
- maintidx
|
2024-05-14 19:54:08 +00:00
|
|
|
- mnd
|
|
|
|
- testpackage
|
|
|
|
- varnamelen
|
|
|
|
- wrapcheck
|
2024-09-10 22:34:10 +00:00
|
|
|
|
|
|
|
run:
|
|
|
|
timeout: 5m
|
2024-08-10 20:05:33 +00:00
|
|
|
|
|
|
|
linters-settings:
|
2024-08-29 22:26:15 +00:00
|
|
|
gosec:
|
|
|
|
excludes:
|
2024-09-29 11:25:04 +00:00
|
|
|
- G101 # Potential hardcoded credentials
|
2024-08-29 22:26:15 +00:00
|
|
|
- G115 # integer overflow conversion
|
|
|
|
|
2024-08-10 20:05:33 +00:00
|
|
|
gci:
|
|
|
|
sections:
|
2024-10-03 18:23:56 +00:00
|
|
|
- prefix(github.com/prometheus-community/windows_exporter/internal/initiate)
|
2024-08-10 20:05:33 +00:00
|
|
|
- standard # Standard section: captures all standard packages.
|
|
|
|
- default # Default section: contains all imports that could not be matched to another section type.
|
|
|
|
custom-order: true
|
|
|
|
tagliatelle:
|
|
|
|
case:
|
|
|
|
use-field-name: true
|
|
|
|
rules:
|
|
|
|
# Any struct tag type can be used.
|
|
|
|
# Support string case: `camel`, `pascal`, `kebab`, `snake`, `upperSnake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`, `header`
|
|
|
|
json: camel
|
|
|
|
yaml: snake
|
2024-09-10 22:34:10 +00:00
|
|
|
forbidigo:
|
|
|
|
forbid:
|
|
|
|
- "^(fmt\\.Print(|f|ln)|print|println)$"
|
2024-11-03 16:23:26 +00:00
|
|
|
- p: "^syscall\\.(.{1,7}|.{7}[^N]|.{9,})$"
|
2024-09-10 22:34:10 +00:00
|
|
|
msg: use golang.org/x/sys/windows instead of syscall
|
|
|
|
- p: "^windows\\.NewLazyDLL$"
|
|
|
|
msg: use NewLazySystemDLL instead NewLazyDLL
|
|
|
|
sloglint:
|
|
|
|
no-mixed-args: true
|
|
|
|
kv-only: false
|
|
|
|
attr-only: true
|
|
|
|
no-global: "all"
|
|
|
|
context: "scope"
|
|
|
|
static-msg: false
|
|
|
|
no-raw-keys: false
|
|
|
|
key-naming-case: snake
|
|
|
|
forbidden-keys:
|
|
|
|
- time
|
|
|
|
- level
|
|
|
|
- msg
|
|
|
|
- source
|
|
|
|
args-on-sep-lines: true
|
|
|
|
stylecheck:
|
|
|
|
checks: ["all", "-ST1003"]
|
2019-10-19 14:50:13 +00:00
|
|
|
issues:
|
|
|
|
exclude:
|
|
|
|
- don't use underscores in Go names
|
2023-11-04 19:51:35 +00:00
|
|
|
- don't use an underscore in package name
|
2019-10-19 14:50:13 +00:00
|
|
|
- exported type .+ should have comment or be unexported
|
|
|
|
exclude-rules:
|
|
|
|
- # Golint has many capitalisation complaints on WMI class names
|
|
|
|
text: "`?\\w+`? should be `?\\w+`?"
|
|
|
|
linters:
|
2021-12-24 10:19:05 +00:00
|
|
|
- revive
|
|
|
|
- text: "don't use ALL_CAPS in Go names; use CamelCase"
|
|
|
|
linters:
|
|
|
|
- revive
|
2024-10-05 19:33:40 +00:00
|
|
|
- path: internal/perfdata/v1/
|
2024-09-10 22:34:10 +00:00
|
|
|
linters:
|
|
|
|
- godox
|
|
|
|
- stylecheck
|