Capture group support
This release introduces support for referencing capture groups in substitution
-based rules:
extends: substitution
message: "Use '%s' instead of '%s'."
ignorecase: true
swap:
"within the (.*)?directory": in the $1 directory
The $1
will be replaced by the contents captured within (.*)
in the regular expression. You can reference multiple capture groups by incrementing the index (such as $2
for a second one, etc.).
Action results now populate the message
key
The results of your custom actions will now be inserted into the relevant rule's message
key, allowing you to create dynamic, script-based suggestions using the CLI.