Repository navigation
feat(config): Add unknown ruletype - #1741
Conversation
| RuleType::UsSsn => smallvec![(v, &*US_SSN_REGEX, ReplaceBehavior::replace_match())], | ||
| RuleType::Userpath => smallvec![(v, &*PATH_REGEX, ReplaceBehavior::replace_group(1))], | ||
|
|
||
| RuleType::Unknown(_) => smallvec![], |
There was a problem hiding this comment.
I think there is one more match statement we need to change:
collect_rules: Skip unknown rules instead of inserting them:
relay/relay-general/src/pii/compiledconfig.rs
Lines 82 to 84 in 37f965b
There was a problem hiding this comment.
nit: Let's put RuleType::Unknown(_) into the same match branch as RuleType::Alias and RuleType::Multiple. The comment "these ought to have been resolved in CompiledConfig" apply to all of them.
jjbayer
left a comment
There was a problem hiding this comment.
See single nitpick, apart from that this looks good to go!
| RuleType::UsSsn => smallvec![(v, &*US_SSN_REGEX, ReplaceBehavior::replace_match())], | ||
| RuleType::Userpath => smallvec![(v, &*PATH_REGEX, ReplaceBehavior::replace_group(1))], | ||
|
|
||
| RuleType::Unknown(_) => smallvec![], |
There was a problem hiding this comment.
nit: Let's put RuleType::Unknown(_) into the same match branch as RuleType::Alias and RuleType::Multiple. The comment "these ought to have been resolved in CompiledConfig" apply to all of them.
Adds a new enum variant to ruletype for forward-compatibility
#1639
#skip-changelog