Is there an analysis parameter to add custom tags to the issues found?

I did not find anything relevant in the Analysis Parameters doc. Is there an analysis parameter to add custom tags to the issues found? I would like to add the same tag (e.g. via the sonar-project.properties file) to all issues resulted from the same scan/analysis.

  • which versions are you using: SonarQube Community Edition Version 8.9.2, Scanner 4.6.2
  • what are you trying to achieve: generate detailed issues reports based on past project versions or revisions
  • what have you tried so far to achieve this: manually adding tags per issue or as a bulk via the API but I would like to do it automatically through the use of the scanner (if possible).

To answer my own question, it seems something like this has not been implemented yet; I have found a new feature request: Adding tags to a scan via properties file?.

Edit: That feature request is to tag projects, not issues.

1 Like

Hi,

What you’ve linked to is actually about adding tags to projects. And you’re right; what you’re after isn’t currently available. Could you describe your use case?

 
Ann

1 Like

@ganncamp thanks for the clarification, I was starting to realize those tags were for projects.

Tagging issues at this level would be very useful to our organization because we would be able to tag each issue with an specific version in an automated way; and then query issues based on tags to generate detailed reports for each version.

Hi,

That’s kinda what I suspected. You should be able to scratch this itch by querying issues based on createdAt. From the onboard docs (check your footer for a link):

Datetime to retrieve issues created during a specific analysis

And, as pointed out in our other thread (and noted here mainly for posterity) SonarQube doesn’t keep permanent record of all issues. They’re cleaned out of the DB after they’re fixed in code. So you probably want to pull your reports in a timely manner.

 
HTH,
Ann

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.