version: "2" linters: default: all disable: - cyclop - depguard - dupl - err113 - exhaustive - exhaustruct - fatcontext - funlen - gocognit - goconst - gocyclo - godot - lll - maintidx - mnd - paralleltest - testpackage - varnamelen - wrapcheck settings: forbidigo: forbid: - pattern: ^(fmt\.Print(|f|ln)|print|println)$ - pattern: ^syscall\.(.{1,7}|.{7}[^N]|.{9,})$ msg: use golang.org/x/sys/windows instead of syscall - pattern: ^windows\.NewLazyDLL$ msg: use NewLazySystemDLL instead NewLazyDLL gosec: excludes: - G101 - G115 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 staticcheck: checks: - -ST1003 - all tagliatelle: case: rules: json: camel yaml: snake use-field-name: true exclusions: generated: lax presets: - comments - common-false-positives - legacy - std-error-handling rules: - linters: - revive text: '`?\w+`? should be `?\w+`?' - linters: - revive text: don't use ALL_CAPS in Go names; use CamelCase - path: .+\.go$ text: don't use underscores in Go names - path: .+\.go$ text: don't use an underscore in package name - path: .+\.go$ text: exported type .+ should have comment or be unexported - linters: - staticcheck text: "ST1003:" paths: - third_party$ - builtin$ - examples$ formatters: enable: - gci - gofmt - gofumpt - goimports settings: gci: sections: - prefix(github.com/prometheus-community/windows_exporter/internal/windowsservice) - standard - default custom-order: true exclusions: generated: lax paths: - third_party$ - builtin$ - examples$