Our web application is scattered across multiple git projects that gets combined into a single application during deployment.
Today, we just clone them into a single root folder and scan them using the SonarQube scanner. This works fine, but it doesn’t seem to understand the “new code” correctly; the New Code feature reports the Baselined bugs again – as new bugs – even if a there is a line change somewhere else in the code, possibly because it doesn’t understand the git blame
correctly.
Example:
Commit 1:
a = a # baseline reports this as a bug
Commit 2:
# Added a comment.
a = a # new code reports this as a bug
This doesn’t seem to happen for a single git repo (the root folder has a .git
in it), it only seems to happen for multiple repos scanned as a single project.
Root
|-- Project 1
| `-- .git
`-- Project 2
`-- .git
Can SonarQube scan multiple git repos, and also understand the git history correctly so that everything – including the New Code feature – works correctly?
SonarQube Version: 7.4