mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-24 23:59:30 +00:00
cspell lint go code (#3706)
This commit is contained in:
@@ -146,14 +146,14 @@ func execWithAxis(c *cli.Context, file, repoPath string, axis matrix.Axis) error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
confstr, err := tmpl.Execute(func(name string) string {
|
||||
confStr, err := tmpl.Execute(func(name string) string {
|
||||
return environ[name]
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
conf, err := yaml.ParseString(confstr)
|
||||
conf, err := yaml.ParseString(confStr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -177,12 +177,12 @@ func execWithAxis(c *cli.Context, file, repoPath string, axis matrix.Axis) error
|
||||
}
|
||||
|
||||
// lint the yaml file
|
||||
if lerr := linter.New(linter.WithTrusted(true)).Lint([]*linter.WorkflowConfig{{
|
||||
if err := linter.New(linter.WithTrusted(true)).Lint([]*linter.WorkflowConfig{{
|
||||
File: path.Base(file),
|
||||
RawConfig: confstr,
|
||||
RawConfig: confStr,
|
||||
Workflow: conf,
|
||||
}}); lerr != nil {
|
||||
return lerr
|
||||
}}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// compiles the yaml file
|
||||
|
Reference in New Issue
Block a user