Getting different number of blocker issues for same code in two different projects

hi Team,
i am using sonarqube * Community Edition

we have two projects with almost same code. one is having 3 blocker issues and second is having 8 blocker issues.the code lines where we are getting issue in fist project , for the same code it is not giving us the issue for second. PFB snippets.

Both the projects are using the same quality profile and quality gate.
the projects was giving 3 warnings but even after removing the warnings we are getting the same difference in blocker issues.
here i am providing the snippet for analysis properties in both projects configured for sonarqube.

Analysis properties :slight_smile:# Required metadata
sonar.projectKey=NUUDAY:NUUDAY_src
sonar.projectName=PS_NUUDAY_SMP_5.3
sonar.projectVersion=1.1

Description of project (optional)

sonar.projectDescription=NUUDAY project analyzed using the SonarQube Runner

Comma-separated paths to directories with sources (required)

sonar.sources=$WORKSPACE/nuuday-src

sonar.java.binaries=$WORKSPACE

Encoding of the source files

sonar.sourceEncoding=UTF-8

#Additional parameters
sonar.my.property=value
sonar.skipPackageDesign=true

SCM

sonar.scm.disabled=true

Hi,

Is there anything interesting in the analysis logs of the project with fewer issues? At a guess, I would say the binaries of that project aren’t being found, and so you’re getting a shallower analysis and thus fewer issues.

 
Ann

Hi @ganncamp,
i can see in both the logs there are different no of files are getting indexed and o files are excluded. PFA.
and i have added the binaries, reran the jobs but still they are showing same no of blockers.
so does it mean we need to remove blockers first as the cause may be due to difference in indexed files ?

but the question remains the same , why for the same common file, that has not changes, that are not marked as won’t fix… we have different analysis …

Hi,

The fact that a different number of files was indexed for each project is interesting… However, your screenshot shows that at least some same-file issues are missing, so that can’t fully account for the difference.

Your mention of Won’t Fix is interesting though. Have you checked both the Won’t Fix and the False Positive filters to see if the issues show up there?

Also, are both projects using the same quality profile(s)?

 
Ann

yes, projects might have different no of files as they grow. thats not an issue.

i have checked for wont fix and false positive in both the projects. but the issues which are marked as with this resolution they are all different. not the one which we are getting in differences.

and both projects are using the same quality profiles and gates.
please suggest the solution ASAP for this.

Hi,

Are both of these projects on the same instance of SonarQube?

 
Ann

Yes, both projects are on same instance.

Might it be related to this issue (one projects counts missmatch)