Currently doing a trial of SonarQube 126.96.36.19942, Developer edition, with the TFS pull request integration, and we’ve run into an issue I can’t make heads or tails of based on the available documentation.
On our develop branch we have a branch policy with two builds (A and B), both of which run code analysis against their own, separate SonarQube projects. A is a mixed web project, with C#/JS/TS etc., whereas B is a back end, pure C#/T-SQL project.
When adding a new code smell to the exact same (C#) file shared by both projects, A correctly(?) adds a comment to the PR about this new code smell only, while analysis B additionally adds a comment on a line of untouched code in the same file (I’ve confirmed by running just B on a fresh PR that it also adds the correct one). While it is indeed correctly identified as a code smell, it was not changed in this PR/branch, so to me this doesn’t seem right. Is this expected behavior? If not, what might be causing this behavior? I’ve tried starting from scratch on both projects, and they still report differently on this file.
If A (which is the one that only reports the actual new code smell I just added) finishes last, it deletes the additional comment added by B. If this is expected behavior, does that also mean that other, accurate PR comments will be deleted by whichever analysis runs last, if that analysis does not contain those issues?