fix: check published version properly

Resulted in a refactor to a new lint package.
This commit is contained in:
2021-12-26 00:00:19 +01:00
parent ba8138079f
commit 9a1cf258a5
5 changed files with 36 additions and 30 deletions

View File

@ -6,7 +6,7 @@ import (
"coopcloud.tech/abra/cli/formatter"
"coopcloud.tech/abra/cli/internal"
"coopcloud.tech/abra/pkg/autocomplete"
recipePkg "coopcloud.tech/abra/pkg/recipe"
"coopcloud.tech/abra/pkg/lint"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)
@ -26,8 +26,8 @@ var recipeLintCommand = &cli.Command{
hasError := false
bar := formatter.CreateProgressbar(-1, "running recipe lint rules...")
for level := range recipePkg.LintRules {
for _, rule := range recipePkg.LintRules[level] {
for level := range lint.LintRules {
for _, rule := range lint.LintRules[level] {
ok, err := rule.Function(recipe)
if err != nil {
logrus.Warn(err)