Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/ptree/ptree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestWalkChildren(t *testing.T) {
require.Equal(t, "ready", string(ready[:]))

var numChildren int
ptree.WalkChildren(cmd.Process.Pid, func(pid int) {
ptree.WalkChildren(cmd.Process.Pid, func(_ int) {
numChildren++
})
assert.Equal(t, depth, numChildren)
Expand Down
2 changes: 1 addition & 1 deletion pipe/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (s *commandStage) filterCmdError(err error) error {
// doesn't do anything on Windows, where the `Signaled()`
// method isn't implemented (it is hardcoded to return
// `false`).
ps, ok := eErr.ProcessState.Sys().(syscall.WaitStatus)
ps, ok := eErr.Sys().(syscall.WaitStatus)
if ok && ps.Signaled() &&
(ps.Signal() == syscall.SIGTERM || ps.Signal() == syscall.SIGKILL) {
return ctxErr
Expand Down
1 change: 0 additions & 1 deletion pipe/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ func TestCopyEnvWithOverride(t *testing.T) {
}

for _, ex := range examples {
ex := ex
t.Run(ex.label, func(t *testing.T) {
assert.ElementsMatch(t, ex.expectedResult,
copyEnvWithOverrides(ex.env, ex.overrides))
Expand Down
3 changes: 2 additions & 1 deletion pipe/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type Env struct {
// and is not reported to the caller.
//
//revive:disable:error-naming
//nolint:staticcheck // ST1012: FinishEarly is the intentional name for this sentinel error
var FinishEarly = errors.New("finish stage early")

//revive:enable:error-naming
Expand Down Expand Up @@ -67,7 +68,7 @@ type Pipeline struct {
panicHandler StagePanicHandler
}

var emptyEventHandler = func(e *Event) {}
var emptyEventHandler = func(_ *Event) {}

type nopWriteCloser struct {
io.Writer
Expand Down
3 changes: 1 addition & 2 deletions pipe/pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ func TestFunction(t *testing.T) {
pipe.Print("hello world"),
pipe.Function(
"farewell",
func(_ context.Context, _ pipe.Env, stdin io.Reader, stdout io.Writer) error {
func(_ context.Context, _ pipe.Env, _ io.Reader, _ io.Writer) error {
panic("this is a panic")
},
),
Expand Down Expand Up @@ -886,7 +886,6 @@ func TestErrors(t *testing.T) {
expectedErr: err1,
},
} {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

Expand Down
Loading