Skip to content

Commit 77160e6

Browse files
committed
[release/1.6] adjust some nolint comments
Some changes to account for 91800c4 and 894af07 runtime/v2/shim/shim.go:178:18: directive `//nolint:staticcheck // Ignore SA4023 as some platforms always return error` is unused for linter "staticcheck" (nolintlint) if err != nil { //nolint:staticcheck // Ignore SA4023 as some platforms always return error ^ runtime/v2/shim/shim.go:264:18: directive `//nolint:staticcheck // Ignore SA4023 as some platforms always return error` is unused for linter "staticcheck" (nolintlint) if err != nil { //nolint:staticcheck // Ignore SA4023 as some platforms always return error ^ runtime/v2/shim/shim.go:269:39: directive `//nolint:staticcheck // Ignore SA4023 as some platforms always return error` is unused for linter "staticcheck" (nolintlint) if err := subreaper(); err != nil { //nolint:staticcheck // Ignore SA4023 as some platforms always return error ^ runtime/v2/shim/shim.go:448:67: directive `//nolint:staticcheck // Ignore SA4023 as some platforms always return error` is unused for linter "staticcheck" (nolintlint) if err := serve(ctx, server, signals, sd.Shutdown); err != nil { //nolint:staticcheck // Ignore SA4023 as some platforms always return error ^ runtime/v2/shim/shim.go:480:18: directive `//nolint:staticcheck // Ignore SA4023 as some platforms always return error` is unused for linter "staticcheck" (nolintlint) if err != nil { //nolint:staticcheck // Ignore SA4023 as some platforms always return error ^ integration/main_test.go:446:31: directive `//nolint:unused` is unused for linter "unused" (nolintlint) func KillPid(pid int) error { //nolint:unused Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 95655f4 commit 77160e6

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

integration/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ func KillProcess(name string, signal syscall.Signal) error {
443443
}
444444

445445
// KillPid kills the process by pid. kill is used.
446-
func KillPid(pid int) error { //nolint:unused
446+
func KillPid(pid int) error {
447447
output, err := exec.Command("kill", strconv.Itoa(pid)).CombinedOutput()
448448
if err != nil {
449449
return fmt.Errorf("failed to kill %d - error: %v, output: %q", pid, err, output)

runtime/v2/shim/shim.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func setLogger(ctx context.Context, id string) (context.Context, error) {
175175
l.Logger.SetLevel(logrus.DebugLevel)
176176
}
177177
f, err := openLog(ctx, id)
178-
if err != nil { //nolint:staticcheck // Ignore SA4023 as some platforms always return error
178+
if err != nil { //nolint:nolintlint,staticcheck // Ignore SA4023 as some platforms always return error
179179
return ctx, err
180180
}
181181
l.Logger.SetOutput(f)
@@ -261,12 +261,12 @@ func run(ctx context.Context, manager Manager, initFunc Init, name string, confi
261261
setRuntime()
262262

263263
signals, err := setupSignals(config)
264-
if err != nil { //nolint:staticcheck // Ignore SA4023 as some platforms always return error
264+
if err != nil { //nolint:nolintlint,staticcheck // Ignore SA4023 as some platforms always return error
265265
return err
266266
}
267267

268268
if !config.NoSubreaper {
269-
if err := subreaper(); err != nil { //nolint:staticcheck // Ignore SA4023 as some platforms always return error
269+
if err := subreaper(); err != nil { //nolint:nolintlint,staticcheck // Ignore SA4023 as some platforms always return error
270270
return err
271271
}
272272
}
@@ -395,14 +395,14 @@ func run(ctx context.Context, manager Manager, initFunc Init, name string, confi
395395
initContext.TTRPCAddress = ttrpcAddress
396396

397397
// load the plugin specific configuration if it is provided
398-
//TODO: Read configuration passed into shim, or from state directory?
399-
//if p.Config != nil {
398+
// TODO: Read configuration passed into shim, or from state directory?
399+
// if p.Config != nil {
400400
// pc, err := config.Decode(p)
401401
// if err != nil {
402402
// return nil, err
403403
// }
404404
// initContext.Config = pc
405-
//}
405+
// }
406406

407407
result := p.Init(initContext)
408408
if err := initialized.Add(result); err != nil {
@@ -445,7 +445,7 @@ func run(ctx context.Context, manager Manager, initFunc Init, name string, confi
445445
}
446446
}
447447

448-
if err := serve(ctx, server, signals, sd.Shutdown); err != nil { //nolint:staticcheck // Ignore SA4023 as some platforms always return error
448+
if err := serve(ctx, server, signals, sd.Shutdown); err != nil { //nolint:nolintlint,staticcheck // Ignore SA4023 as some platforms always return error
449449
if err != shutdown.ErrShutdown {
450450
return err
451451
}
@@ -477,7 +477,7 @@ func serve(ctx context.Context, server *ttrpc.Server, signals chan os.Signal, sh
477477
}
478478

479479
l, err := serveListener(socketFlag)
480-
if err != nil { //nolint:staticcheck // Ignore SA4023 as some platforms always return error
480+
if err != nil { //nolint:nolintlint,staticcheck // Ignore SA4023 as some platforms always return error
481481
return err
482482
}
483483
go func() {

0 commit comments

Comments
 (0)