Commit 1a80fca
authored
vet: adds a check to disallow usage of regex.Compile in xDS code (grpc#9216)
Fixes : grpc#9153
This PR adds a check to disallow usage of `regex.Compile` in xDS code.
Excludes the following from check :
- all test files
- internal/xds/matcher/string_matcher.go : because this is where
`SafeRegex` function lives
- unmarshal_rds.go - becuase `hashPoliciesProtoToSlice` needs to use it
because it requires partial matches too , to replace the substring.
RELEASE NOTES: None1 parent 26ffdb3 commit 1a80fca
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
86 | 94 | | |
87 | 95 | | |
88 | 96 | | |
| |||
0 commit comments