mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
Add deprecation warnings (#2725)
This commit is contained in:
@@ -167,7 +167,11 @@ func execWithAxis(c *cli.Context, file, repoPath string, axis matrix.Axis) error
|
||||
}
|
||||
|
||||
// lint the yaml file
|
||||
if lerr := linter.New(linter.WithTrusted(true)).Lint(confstr, conf); lerr != nil {
|
||||
if lerr := linter.New(linter.WithTrusted(true)).Lint([]*linter.WorkflowConfig{{
|
||||
File: path.Base(file),
|
||||
RawConfig: confstr,
|
||||
Workflow: conf,
|
||||
}}); lerr != nil {
|
||||
return lerr
|
||||
}
|
||||
|
||||
|
||||
@@ -93,9 +93,16 @@ func lintFile(_ *cli.Context, file string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
err = linter.New(linter.WithTrusted(true)).Lint(string(buf), c)
|
||||
config := &linter.WorkflowConfig{
|
||||
File: path.Base(file),
|
||||
RawConfig: rawConfig,
|
||||
Workflow: c,
|
||||
}
|
||||
|
||||
// TODO: lint multiple files at once to allow checks for sth like "depends_on" to work
|
||||
err = linter.New(linter.WithTrusted(true)).Lint([]*linter.WorkflowConfig{config})
|
||||
if err != nil {
|
||||
fmt.Printf("🔥 %s has errors:\n", output.String(path.Base(file)).Underline())
|
||||
fmt.Printf("🔥 %s has errors:\n", output.String(config.File).Underline())
|
||||
|
||||
hasErrors := true
|
||||
for _, err := range pipeline_errors.GetPipelineErrors(err) {
|
||||
|
||||
Reference in New Issue
Block a user