gjd6640 / sonar-text-plugin

A free and open-source plugin for SonarSource's Sonarqube product that lets you create rules to flag issues in text files.
Apache License 2.0
23 stars 4 forks source link

Support a rule that raises an issue only if multiple expressions match to text #1

Open gjd6640 opened 9 years ago

gjd6640 commented 9 years ago

Provide a rule template that allows you to specify several match patterns individually and have it raise an issue only when all are present. Today you can use the multiline (DOTALL) regex rule template type to do this but you have to figure out how to express in your expression that the patterns can appear in any order. It's simpler for the user to be able to specify several patterns independently. Maybe allow for up to 5 patterns and ignore any unused leftover pattern fields.