Rule tag search syntax?

Sonarqube Enterprise Edition Version 8.3.1 (build 34397)

We are systematically reviewing Java rules and our plan is to apply a “reviewed-accepted” or “reviewed-rejected” tag on a rule as our indicator of having dispositioned a rule. It’s easy to select these tags to see the set of items that have them on it, but each time we return to the task we want to start with the inverse set of rules, i.e. !(tag=reviewed-accepted OR tag=reviewed-rejected"). I couldn’t find a reference for search syntax such as this.

Another approach would be to bulk tag all rules with “not-reviewed” and then work through those, updating the tag as we go, but I didn’t see a way to bulk tag. There’s hundreds of Java rules…

Hi,

Sorry but rule tagging just wasn’t built to accommodate what you’re trying to do.

Your best bet would be to script that. The bonus here is that you could easily make it smart enough to not “unreviewed”-tag rules that had already been reviewed. Whereas bulk tagging via the SonarQube interface wouldn’t be that smart.

You’ll find the onboard Web API documentation link in the page footer. And you can get a head start on which calls to use by using your browser’s developer tools to eavesdrop on the calls the UI uses to do the same operations.

 
HTH,
Ann