- SonarQube Developer Edition Version 7.9.1 LTS , latest Code Scan Plugin , SonarQube extension for Azure DevOps Server
We have AzureDevOps build pipeline which has code analysis step which integrates SonarQube VSTS extension to analyze Salesforce Code base by calling the following tasks–>
1)Prepare Analysis Configuration
2)Run Code Analysis
3)Publish Quality Gate Result
We use Azure git repo with master and feature branches.Now lets say for example our feature branch get committed with two components then the build pipeline gets triggered , run the tasks and once the scan is completed we can see the new SonarQube feature branch under master branch with exactly two files on SQ . The scan results were correct as it showed only new issues of the two files in that feature branch.This was working correctly since beginning of AzDO/SQ integration.
But since last few weeks we have seen the results are not correct. To explain lets say for example our feature branch get committed with two components but now once the scan is completed we can see the new SonarQube feature branch not only includes our two files which were part of the initial feature branch but lots of other files from Azure master branch commit which are actually not part of our initial feature branch. So even developer has one issue in his two files but because of the other files being included it shows lots of errors and quality gate being “Failed”.
Also sometimes some of the files in the feature branch commit are not supported by Codescan plugin so previously if we use to commit such feature branch then SQscan results would say “no issues” with passed status and the SQ feature branch code tab section showed nothing , which was correct as our feature had unsupported files/non code components. But now even if our feature branch had unsupported files , SQ feature branch will show other files from Azure master branch commit which are actually not part of our initial feature branch.
Please suggest how to resolve it or what can be the root cause for it as it was working fine since beginning. Any help here will be highly appreciated.