SonarQube Community 7.7 not detect new issues with new analisys

  • versions used = SonarQube Community 7.7
  • error observed = When i make new analisys in my gitlab pipeline (with large project, with 17k issues… yes, the hell xD) i write new issues intentionally to see new issues on sonarqube history but it not refreshi project status (respecting new issues, because it shows new versions, i use commit hash as version), the interesting here is that code is updated and it shows the line code with the error, but sonarqube not mark it like that.

this is my sonar-project.properties file that i build dinamically with CI variables:
line1=“sonar.host.url=”$sonarqubeUrl
line2=“sonar.projectKey=”$CI_PROJECT_NAME
line3=“sonar.projectName=”$CI_PROJECT_NAME
line4=“sonar.projectVersion=”$CI_COMMIT_SHORT_SHA
line5=“sonar.sources=./TEST”
line6=“sonar.sourceEncoding=UTF-8”
line7=“sonar.exclusions=CI-CD/**”
line8=“sonar.login=”$GITLAB_USER_LOGIN
line9=“sonar.password=”$GITLAB_USER_LOGIN

PS: My project is in Java 8.

Hi,

It’s not clear to me where you’re not seeing expected issues. Are you talking about the SonarQube interface? And if so, did analysis run normally? I.E. no errors in the analysis log, and successful background task completion?

 
Ann

Hi Ann thanks for your response and im sorry by not be too clear, answering your questions:
Are you talking about the SonarQube interface?
Yes, the web interface localhost:9000, the new issues not count like an issue, just mark it of gray color (i think that is gray color :D) on code files.
And if so, did analysis run normally?
Yes, the analysis says “EXECUTION SUCCESS” at the end
I.E. no errors in the analysis log, and successful background task completion?
Yes, but i attached the files with scanner’s ouput debug and sonar-project.properties file. (for confidentiality i put **** characters in some paths and some files but it works for your revision)

thanks and I wait for your soon answer

sonar-output.txt (716.9 KB)
sonar-project.properties.txt (299 Bytes)

Hi,

Could you maybe provide a screenshot of that?

And maybe that too, please?

 
:slight_smile:
Ann

Could you maybe provide a screenshot of that?
This image shows code with error not marked as issue:

the new issues not count like an issue, just mark it of gray color (i think that is gray color :D) on code files.
i don’t know why it not show gray background color, but i attached this image of an issue in same file on top:

I don’t know if this is important, but i attached a screenshot of my pipeline ouput when sonar-scanner is running:

Hi,

Thanks for that last screenshot. It confirms what I suspected; your “issues” aren’t actually issues. All SonarSource analyzers expect compilable (or for an interpreted language, runnable) code. What you added to test raising issues won’t run, and thus is unparsable by the analyzer. What it can’t parse, it can’t analyze, so you get no issues.

 
HTH,
Ann

1 Like

Thanks a lot Ann, i will test with runnable code to see that behavior.

It works! sorry for response too late, thanks so much Ann!

1 Like