rspec/rules/S124/java/rule.adoc

6 lines
539 B
Plaintext
Raw Normal View History

2020-12-23 14:59:06 +01:00
This rule template can be used to create rules which will be triggered when the full content of a comment matches a given regular expression. Note that the regular expression should be expressed using the dotall format (where the ``.`` character matches any character).
2020-06-30 10:16:44 +02:00
2020-12-23 14:59:06 +01:00
For example, one can create a rule with the regular expression ``.*REVIEW.*`` to match all comment containing "REVIEW".
2020-06-30 10:16:44 +02:00
2020-12-23 14:59:06 +01:00
Note that, in order to match REVIEW regardless of the case, the ``(?i)`` modifier should be prepended to the expression, as in ``(?i).*REVIEW.*``.