Skip to content

Commit

Permalink
addressing linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
KellyMerrick committed Nov 7, 2024
1 parent a51e7aa commit 2cfe59b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions action/pipeline/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ func (c *Config) Exec(client compiler.Engine) error {

// counter for total steps to run
totalSteps := 0

for i, stage := range _pipeline.Stages {

Check failure on line 134 in action/pipeline/exec.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] action/pipeline/exec.go#L134

unnecessary leading newline (whitespace)
Raw output
action/pipeline/exec.go:134:43: unnecessary leading newline (whitespace)

^

filteredStageSteps := stage.Steps[:0]
Expand All @@ -151,17 +150,16 @@ func (c *Config) Exec(client compiler.Engine) error {
if totalSteps <= 1 {
return fmt.Errorf("no steps left to run after removing skipped steps")
}

} else {
// if not using stages

filteredSteps := _pipeline.Steps[:0]

for _, step := range _pipeline.Steps {
if !slices.Contains(stepsToRemove, step.Name) {
filteredSteps = append(filteredSteps, step)
}
}

_pipeline.Steps = filteredSteps

// check if any steps are left to run, excluding "init" step
Expand Down

0 comments on commit 2cfe59b

Please sign in to comment.