-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Simple rules should have higher priority than regular expression rules #3565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple rules should have higher priority than regular expression rules #3565
Conversation
|
The code itself looks fine. However, since this feature introduces a breaking change to the default behavior, it would be best to include a feature switch for it in the current release—disabled by default. We’ll highlight this in the release notes and plan to either enable it by default or remove the switch entirely in a future version. |
…match, default: false, keeps backward compatibility.
Makes sense — I’ve added an optional switch to handle this case as suggested. |
LearningGp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Thanks for contributing! |
…isabled, configurable)(alibaba#3565) * Simple rules should have higher priority than regular expression rules * Add optional switch to skip regex matching when simple rules already match, default: false, keeps backward compatibility. * fix RuleManagerTest unit test failure
Describe what this PR does / why we need it
当同时配置了具体规则和正则规则时,应该优先使用具体规则,而不是同时使用两种规则。
Does this pull request fix one issue?
Fixes #3564
Describe how you did it
当具体规则存在时,不再匹配正则规则。
Describe how to verify it
测试
Special notes for reviews