Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshMcCullough committed May 15, 2023
1 parent ab711ff commit 5a95bfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/model/workflow.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package model

import (
"errors"
"fmt"
"io"
"reflect"
Expand Down Expand Up @@ -489,7 +488,7 @@ func (j *Job) Type() (JobType, error) {
}
}

return JobTypeInvalid, errors.New(fmt.Sprintf("`uses` key references invalid workflow path '%s'. Must start with './.github/workflows/' if it's a local workflow, or must start with '<org>/<repo>/.github/workflows/' and include an '@' if it's a remote workflow.", j.Uses))
return JobTypeInvalid, fmt.Errorf("`uses` key references invalid workflow path '%s'. Must start with './.github/workflows/' if it's a local workflow, or must start with '<org>/<repo>/.github/workflows/' and include an '@' if it's a remote workflow.", j.Uses)
}

return JobTypeDefault, nil
Expand Down
2 changes: 2 additions & 0 deletions pkg/model/workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ jobs:
assert.Equal(t, JobTypeReusableWorkflowLocal, job)
}

//nolint:dupl
func TestReadWorkflow_JobTypes_InvalidPath(t *testing.T) {
yaml := `
name: invalid job definition
Expand Down Expand Up @@ -224,6 +225,7 @@ jobs:
assert.NotEqual(t, nil, err)
}

// nolint:dupl
func TestReadWorkflow_StepsTypes(t *testing.T) {
yaml := `
name: invalid step definition
Expand Down

0 comments on commit 5a95bfe

Please sign in to comment.