You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- G306# G306: Expect WriteFile permissions to be 0600 or less (too restrictive; also flags "0o644" permissions)
83
-
- G307# G307: Deferring unsafe method "*os.File" on type "Close" (also EXC0008); (TODO: evaluate these and fix where needed: G307: Deferring unsafe method "*os.File" on type "Close")
84
-
govet:
85
-
enable:
86
-
- shadow
87
-
settings:
88
-
shadow:
89
-
strict: true
90
-
lll:
91
-
line-length: 200
92
-
nakedret:
93
-
# Disallow naked returns if func has more lines of code than this setting.
# FIXME(thaJeztah): Disable `os.Chdir()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
127
-
os-chdir: false
128
-
# FIXME(thaJeztah): Disable `context.Background()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
129
-
context-background: false
130
-
# FIXME(thaJeztah): Disable `context.TODO()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
131
-
context-todo: false
132
-
133
-
issues:
134
-
# The default exclusion rules are a bit too permissive, so copying the relevant ones below
135
-
exclude-use-default: false
136
-
137
-
# This option has been defined when Go modules was not existed and when the
138
-
# golangci-lint core was different, this is not something we still recommend.
139
-
exclude-dirs-use-default: false
140
-
141
-
exclude:
142
-
- parameter .* always receives
143
-
144
-
exclude-files:
145
-
- cli/compose/schema/bindata.go
146
-
- .*generated.*
147
-
148
-
exclude-rules:
149
-
# We prefer to use an "exclude-list" so that new "default" exclusions are not
65
+
settings:
66
+
depguard:
67
+
rules:
68
+
main:
69
+
deny:
70
+
- pkg: "github.com/containerd/containerd/errdefs"
71
+
desc: The containerd errdefs package was migrated to a separate module. Use github.com/containerd/errdefs instead.
72
+
- pkg: "github.com/containerd/containerd/log"
73
+
desc: The containerd log package was migrated to a separate module. Use github.com/containerd/log instead.
- G306# G306: Expect WriteFile permissions to be 0600 or less (too restrictive; also flags "0o644" permissions)
99
+
- G307# G307: Deferring unsafe method "*os.File" on type "Close" (also EXC0008); (TODO: evaluate these and fix where needed: G307: Deferring unsafe method "*os.File" on type "Close")
100
+
101
+
govet:
102
+
enable:
103
+
- shadow
104
+
settings:
105
+
shadow:
106
+
strict: true
107
+
108
+
lll:
109
+
line-length: 200
110
+
111
+
nakedret:
112
+
# Disallow naked returns if func has more lines of code than this setting.
113
+
# Default: 30
114
+
max-func-lines: 0
115
+
116
+
staticcheck:
117
+
checks:
118
+
- all
119
+
- -QF1003 # FIXME Convert if/else-if chain to tagged switch
120
+
- -QF1008 # FIXME Omit embedded fields from selector expression
121
+
- -ST1020 # FIXME The documentation of an exported function should start with the function’s name
122
+
- -ST1022 # FIXME The documentation of an exported variable or constant should start with variable’s name
os-chdir: false # FIXME(thaJeztah): Disable `os.Chdir()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
136
+
context-background: false # FIXME(thaJeztah): Disable `context.Background()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
137
+
context-todo: false # FIXME(thaJeztah): Disable `context.TODO()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
138
+
139
+
exclusions:
140
+
# We prefer to use an "linters.exclusions.rules" so that new "default" exclusions are not
150
141
# automatically inherited. We can decide whether or not to follow upstream
151
142
# defaults when updating golang-ci-lint versions.
152
143
# Unfortunately, this means we have to copy the whole exclusion pattern, as
0 commit comments