Open
Conversation
Switched the group order for rule_pattern, so that the group "raw" is processed with the preceeding #. In the previous order, a disabled rule would not be commented out in the "raw" rule string, and would have to be added manually.
wbbigdave
commented
Mar 18, 2024
Author
wbbigdave
left a comment
There was a problem hiding this comment.
Specifically switched the ordering of these Rregex groups. In the old system, the raw rule dropped the comment # because it was matched by the first group. This mean, that if you stored the rule in a database or similar, then the raw rule had to be ammended on output in order to remain commented out of the file. This quick change means that the rule is still parsed correctly, but the raw rule retains the #, and the enabled flag is also still maintained.
Owner
|
@wbbigdave, thank you for contribution. Pull master branch in your fork, that CI jobs can be run in PR. And your change fail some tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switched the group order for rule_pattern, so that the group "raw" is processed with the preceeding #. In the previous order, a disabled rule would not be commented out in the "raw" rule string, and would have to be added manually.