Skip to content

Commit 265431b

Browse files
authored
Merge pull request #2496 from alexandear/fix-func-pkgs-comments
Fix function and package comments
2 parents a6d13e6 + fc5556e commit 265431b

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

.golangci.yml

+7
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ issues:
137137
max-issues-per-linter: 0
138138
# Maximum count of issues with the same text.
139139
max-same-issues: 0
140+
include:
141+
- EXC0013 # revive: package comment should be of the form "(.+)..."
142+
- EXC0014 # revive: comment on exported (.+) should be of the form "(.+)..."
140143
exclude-rules:
141144
# Allow using Uid, Gid in pkg/osutil.
142145
- path: "pkg/osutil/"
@@ -145,3 +148,7 @@ issues:
145148
- path: _test\.go
146149
linters:
147150
- godot
151+
# Disable revive.exported for constants.
152+
- text: "exported: comment on exported const"
153+
linters:
154+
- revive

pkg/guestagent/api/gen.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
//go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative guestservice.proto --descriptor_set_out=guestservice.pb.desc
2+
23
package api

pkg/guestagent/kubernetesservice/kubernetesservice.go

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type Protocol string
2323

2424
const (
2525
// UDP/SCTP when lima port forwarding works on those protocols.
26+
2627
TCP Protocol = "TCP"
2728
)
2829

pkg/start/start.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,13 @@ func watchHostAgentEvents(ctx context.Context, inst *store.Instance, haStdoutPat
324324

325325
type watchHostAgentEventsTimeoutKey = struct{}
326326

327-
// WithWatchHostAgentEventsTimeout sets the value of the timeout to use for
327+
// WithWatchHostAgentTimeout sets the value of the timeout to use for
328328
// watchHostAgentEvents in the given Context.
329329
func WithWatchHostAgentTimeout(ctx context.Context, timeout time.Duration) context.Context {
330330
return context.WithValue(ctx, watchHostAgentEventsTimeoutKey{}, timeout)
331331
}
332332

333-
// watchHostAgentEventsTimeout returns the value of the timeout to use for
333+
// watchHostAgentTimeout returns the value of the timeout to use for
334334
// watchHostAgentEvents contained in the given Context, or its default value.
335335
func watchHostAgentTimeout(ctx context.Context) time.Duration {
336336
if timeout, ok := ctx.Value(watchHostAgentEventsTimeoutKey{}).(time.Duration); ok {

0 commit comments

Comments
 (0)