Debian Codegraph @

helpers/ignore_regex.go

raw
1 // Copyright 2023-2024 Princess Beef Heavy Industries, LLC / Dave Shanley
2 // https://pb33f.io
3
4 package helpers
5
6 import "regexp"
7
8 var (
9 // Ignore generic poly errors that just say "none matched" since we get specific errors
10 // But keep errors that say which subschemas matched (for multiple match scenarios)
11 IgnorePattern = `^'?(anyOf|allOf|oneOf|validation)'? failed(, none matched)?$`
12 IgnorePolyPattern = `^'?(anyOf|allOf|oneOf)'? failed(, none matched)?$`
13 )
14
15 // IgnoreRegex is a regular expression that matches the IgnorePattern
16 var IgnoreRegex = regexp.MustCompile(IgnorePattern)
17
18 // IgnorePolyRegex is a regular expression that matches the IgnorePattern
19 var IgnorePolyRegex = regexp.MustCompile(IgnorePolyPattern)