Before I ask what is going to sound like a dumb question, I’ll give a little background to it. Let’s say
ruleA has no tags
it raises an issue (issue1)
issue1 has no tags
add a tag (‘foo’) to ruleA
reanalyze & raise another issue (issue2)
issue1 still has no tags. issue2 is tagged with ‘foo’
So… you’ve verified that the rules have tags. To be clear, have issues been raised by rules with tags since you verified that the tags existed on the rules? And those since-verification issues have no tags?
Also, the only possible cause that springs to mind for this is a bad Elasticsearch index, although I haven’t seen this particular symptom of ES index problems before. Nonetheless, maybe you could eliminate that by:
shut down the server
delete $SONARQUBE_HOME/data/es6
restart the server
That will force all the indices to be rebuilt. Startup time will vary depending on the size of your instance.
So here’s what I do:
*) Create the project in SonarQube.
*) Click ‘Configure analysis’.
*) Generate a token: blah-blah -> Generate
*) Further settings: Java, Gradle.
*) This command is autogenerated for me: gradlew sonarqube -Dsonar.projectKey=ForSonarQube -Dsonar.host.url=http://localhost:9000 -Dsonar.login=dbb1ce3a74692f8d3159757cd2f5a6eabed77d63
*) After execution, ‘issues’ are loaded. There are still no tags.
So…
I go to Quality Profiles -> Sonar Way Java … -> Rules
Almost all rules have tags. For a test, I add an additional tag in a rule.
Execute the command gradlew sonarqube ... once again
After this in ‘Project -> Issues’ each issue has ‘No tags’.
Despite the absence of tags when I click in documentation ‘Why is this an issue?’, there are tags in the header.
Well, I can’t filter issues by tags as well (
P.S. deleting a directory $SONARQUBE_HOME/data/es6 didn’t help (.
I am facing the same with Version 8.4.2 (build 36762).
The Tags are visible on the analysis which were done before i upgraded. The previous version was 7.9.4 LTS.