Inconsistent or Unviewable Code Smells After Scan – Issue View Doesn’t Match Summary

Versions

  • SonarQube Server: v2025.1.1 Developer Edition
  • Scanner: 5.0.0.4389
  • Deployment Method : Docker
  • Plugins / Extensions : Sonar-Maven-Plugin

What I’m Trying to Achieve

I’m trying to view all open Code Smell issues for a specific project scanned by SonarQube, across multiple branches.

Issue

After the scan completes, the Overview page correctly shows that there are 21 open Code Smell issues. However, when I navigate to the Issues tab:

  • Some or all of the issues are grayed out and unclickable
  • In some cases, the Issues tab displays fewer issues than reported on the overview page

This inconsistency affects all scanned branches of the project.

What I’ve Tried So Far

  • Restarted the SonarQube instance → No change
  • Forced a global re-index of all projects → Resolved issue for most projects
  • Targeted re-index for the impacted project → No change
  • Deleted the project and re-ran a fresh scan → Resolved the issue, but resulted in loss of project history

Request for Help

Has anyone experienced this kind of issue mismatch between the Overview and Issues tab before?

Is there a way to fix or re-sync project-level issue visibility without deleting the project and losing history?

Any guidance would be greatly appreciated!

Hi,

Welcome to the community!

The normal resolution for this is an Elastisearch reindex.

I wish you had come to us before you deleted the project. I’d have liked to see a screenshot of the greyed-out issues you mentioned.

 
Ann

Hi Ann, Thanks for your response. So i’ve triggered a re-index for the impacted projects. Which has resolved the majority of the projects that were impacted. We have many more projects that are still experiencing this issue after re-indexing

The screenshot below shows no issues under code smells.

However after clicking on the link, there are issues that have been raised and I am unable to view them.

Hi,

Could you show the rest of the facet list on the right of that page?

 
Thx,
Ann

Sure, is this page the one you are referring too?

Hi,

Yes. I’m hoping to see more of that left rail.

 
Thx,
Ann

Hi Ann,

Thanks for your response on this, this is an screenshot of the entire page, with the panel on the left collapsed. The only thing i’ve hidden is the name of the project.

Hi,

Thanks for the screenshot.

I was hoping there was some additional filtering going on, but clearly there’s not.

You’re in 2025.1.1, and your screenshot shows that you’re in the Standard quality mode.

Did you ever try the MQR mode? Analyze any projects in that mode? Switching back and forth should be entirely transparent, but given that you’ve already reindexed (which would be my standard advice) multiple times, I’m wondering if something is going on with that.

 
Ann

Hi Ann,

We haven’t tried MQR mode, I’ve re-indexed the impacted loads of times now. One of my colleagues have found these steps.

  1. Rebuild indexes
  • Check for inconsistencies: SonarQube can eventually recover from indices being behind data, but if inconsistencies persist, rebuild the indices.
  • Stop SonarQube: Halt the SonarQube server.
  • Delete the data/es7 directory: This directory contains the Elasticsearch indices.
  • Restart SonarQube: Start the server again.

Is this something you would recommend? When we run the re-index job. Does that job delete the existing index prior to creating a new one?

Hi,

I’m confused. What you’ve listed are the steps to reindex. If those steps are new to you when what “reindex” procedure have you been following?

And yes, if you haven’t done those steps, then that’s the next thing I would do.

 
HTH,
Ann

Hi Ann,

We’ve ran an reindex via the api and i wrote a script to go through all the projects and trigger a re-index. This is the API call, I’ve used it’s on this page
SonarQube . It worked for some projects as i’ve mentioned but not all.

I haven’t gone into the data directory and delete that folder as yet. My question was that does the API delete the existing index and create a new one? The thing with the steps that my colleague has provided it we will have some downtime, which if avoid would be great.

Cheers Dan

Hi,

The API does not fully delete the index. I think that’s what you need to do now.

Yes. And how long that lasts will depend on the size of your instance. But it’s what needs to happen now.

 
Ann