diff --git a/motor/rule_applicator_test.go b/motor/rule_applicator_test.go index ecd77efc..4586ae7b 100644 --- a/motor/rule_applicator_test.go +++ b/motor/rule_applicator_test.go @@ -1622,7 +1622,7 @@ components: }, }) - //nolint:staticcheck // ignore this linting issue, its no a bug, it's on purpose. + //nolint:staticcheck // ignore this linting issue, it's not a bug, it's on purpose. time.Sleep(100) assert.True(t, panicRan) diff --git a/rulesets/remote_ruleset.go b/rulesets/remote_ruleset.go index c83ab8db..7199076d 100644 --- a/rulesets/remote_ruleset.go +++ b/rulesets/remote_ruleset.go @@ -18,7 +18,7 @@ import ( // CheckForRemoteExtends checks if the extends map contains a remote link // returns true if it does, false if it does not func CheckForRemoteExtends(extends map[string]string) bool { - for k, _ := range extends { + for k := range extends { if strings.HasPrefix(k, "http") { return true } @@ -29,7 +29,7 @@ func CheckForRemoteExtends(extends map[string]string) bool { // CheckForLocalExtends checks if the extends map contains a local link // returns true if it does, false if it does not func CheckForLocalExtends(extends map[string]string) bool { - for k, _ := range extends { + for k := range extends { if filepath.Ext(k) == ".yaml" || filepath.Ext(k) == ".json" { return true } @@ -166,7 +166,7 @@ func SniffOutAllExternalRules( // do we have extensions? if CheckForRemoteExtends(extends) || CheckForLocalExtends(extends) { - for k, _ := range extends { + for k := range extends { if strings.HasPrefix(k, "http") || filepath.Ext(k) == ".yaml" || filepath.Ext(k) == ".json" { if slices.Contains(visited, k) { rsm.logger.Warn("ruleset links to its self, circular rulesets are not permitted", @@ -179,5 +179,4 @@ func SniffOutAllExternalRules( } } } - return } diff --git a/rulesets/rulesets.go b/rulesets/rulesets.go index 946108ad..554420e6 100644 --- a/rulesets/rulesets.go +++ b/rulesets/rulesets.go @@ -246,7 +246,7 @@ func (rsm ruleSetsModel) GenerateRuleSetFromSuppliedRuleSet(ruleset *RuleSet) *R go func() { - for k, _ := range extends { + for k := range extends { if strings.HasPrefix(k, "http") || filepath.Ext(k) == ".yaml" || filepath.Ext(k) == ".json" { total++ remote := false