-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
83 lines (80 loc) · 2.17 KB
/
.golangci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
run:
timeout: 10m
issues:
exclude:
- ST1005.*
- "should not use dot imports"
- "don't use an underscore in package name"
- "exported: .*"
exclude-dirs:
# this code has been copied from kubectl cli. No need to lint external code.
- go_lib/dependency/k8s/drain
# this code has been copied from kubernetes vertical-pod-autoscaler. No need to lint external code.
- modules/302-vertical-pod-autoscaler/hooks/internal/vertical-pod-autoscaler/v1
linters-settings:
gci:
sections:
- standard
- default
- prefix(github.com/deckhouse/)
goimports:
local-prefixes: github.com/deckhouse/
# TODO: replace deprecated methods
# ignore deprecated
# https://staticcheck.dev/docs/checks/#SA1019
staticcheck:
checks: ["all","-SA1019"]
errcheck:
# Is Depricateed, use exclude-functions: https://github.com/kisielk/errcheck#excluding-functions
exclude-functions:
- fmt:.*[rR]ead|[wW]rite|[cC]lose
- io:Copy
sloglint:
# Enforce not mixing key-value pairs and attributes.
no-mixed-args: true
# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
kv-only: false
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
attr-only: false
# Enforce not using global loggers.
no-global: ""
# Enforce using methods that accept a context.
context: ""
# Enforce using static values for log messages.
static-msg: false
# Enforce using constants instead of raw keys.
no-raw-keys: false
# Enforce a single key naming convention.
key-naming-case: ""
# Enforce not using specific keys.
forbidden-keys:
- level
- msg
- logger
- source
- stacktrace
- time
# Enforce putting arguments on separate lines.
args-on-sep-lines: false
linters:
disable-all: true
enable:
- dogsled
- errcheck
- gci
- gocritic
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- misspell
- revive
- sloglint
- staticcheck
# - structcheck
- typecheck
- unconvert
- unparam
- whitespace
- copyloopvar