Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
fix: list boundaries error
Browse files Browse the repository at this point in the history
  • Loading branch information
OriYosef authored Oct 2, 2022
1 parent 5fc4a5d commit d6c816e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/rulesConfig/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ func (rc *RulesConfig) JSONSchemaValidate(ruleName string, rule *defaultRules.Ru

for _, rawSchemaError := range schemaResult.Errors() {
errorFields := strings.Split(rawSchemaError.Field(), ".")
trimedErrorField := strings.Join(errorFields[:5], ".")
var trimedErrorField string
if len(errorFields) > 4 {
trimedErrorField = strings.Join(errorFields[:5], ".")
} else {
trimedErrorField = strings.Join(errorFields[:], ".")
}
if errorByField[trimedErrorField] {
continue
}
Expand Down

0 comments on commit d6c816e

Please sign in to comment.