mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-29 01:26:14 +02:00
fix: Adjust the lint issues
Signed-off-by: ZPascal <pascal.zimmermann@theiotstudio.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"maps"
|
||||
"slices"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
@@ -165,12 +166,7 @@ func yamlNodeContainsNeedsOutputsExpr(node *yaml.Node) bool {
|
||||
if node.Kind == yaml.ScalarNode {
|
||||
return containsNeedsOutputsExpr(node.Value)
|
||||
}
|
||||
for _, child := range node.Content {
|
||||
if yamlNodeContainsNeedsOutputsExpr(child) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return slices.ContainsFunc(node.Content, yamlNodeContainsNeedsOutputsExpr)
|
||||
}
|
||||
|
||||
// containsNeedsOutputsExpr returns true when s contains a GitHub Actions
|
||||
|
||||
@@ -60,7 +60,7 @@ matrix:
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "empty strategy",
|
||||
name: "empty strategy",
|
||||
strategy: "",
|
||||
want: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user