Connected to SonarCloud or SonarQube (and which version): SonarQube 9.6.1.59531
And a thorough description of the problem / question:
New to here and could not find a similar topic, sorry if it has been asked before.
Steps:
Created a feature branch from a release branch of the master1 but did not work on it straight away
Nightly scan raises a S107 issue is in the master branch, release branch
SonarLint reports on the S107 issue in the feature branch
The issue marked as “Won’t fix” in master branch and release branch
Opening the release branch, SonarLint no longer raises the S107 issue
Opening the feature branch, SonarLine still raises the issue.
No changes/commits have been made to the feature branch at this time
→ Have not found a way to get the feature branch to accept the status change on the S107 issue. Thought that this was working correctly but at least for this feature branch it is not syncing. Is there some way to track what is going on?
SonarLint will synchronize issues status with SonarQube, trying to find the best matching branch between your currently checked out branch, and available branches on SonarQube.
Since in your case the “feature” branch is not yet analyzed on SonarQube, this “branch matching” should fallback on the master branch. You can confirm that by enabling verbose logs in the SonarLint logs, and triggering a forced update of the local storage:
When trying to find the best matching branch on SonarQube, SonarLint will look for the “closest” match. So if you created the feature branch by forking develop, then it is expected that SonarLint will synchronize issue status with it.
Is the issue marked as “Won’t fix” on the develop branch?
It is marked as “Won’t fix” on all branches in SonarQube.
I invalidated all indexes in Rider and reopened Rider and resynced SonarLint. It is now not finding any issues in the file. Rider is still indexing so something might still happen.
Configuring analysis with org.sonarlint.intellij.rider.RiderAnalysisConfigurator
Using connection 'Thula' for project 'SFM_SFM_AYFc14sYIHiAo-uBezV4'
Analysing 'M251Generator.cs'...
Starting analysis with configuration:
[
projectKey: SFM_SFM_AYFc14sYIHiAo-uBezV4
baseDir: C:\ATR\Thula\SFM\src
extraProperties: {sonar.cs.internal.solutionPath=C:\ATR\Thula\SFM\src\SFM.sln, sonar.cs.internal.dotnetCliExeLocation=C:\Program Files\dotnet\dotnet.exe, sonar.cs.internal.msBuildPath=C:\Program Files\dotnet\sdk\6.0.101}
moduleKey: Module: 'rider.module'
inputFiles: [
file:///C:/ATR/Thula/SFM/src/server/SFM.Server.Core/Core/BusinessLogic/MessageHandlers/M251/M251Generator.cs (UTF-8)
]
]
Done in 27ms
Processed 0 issues
Found 0 issues
Execute Sensor: OmniSharp
Timeout waiting for the solution to be loaded. You can find help on https://github.com/SonarSource/sonarlint-intellij/wiki/Rider
Done in 14ms