LOC is sum of project even for same repo

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • Version 10.1 (build 73491)
  • how is SonarQube deployed: zip, Docker, Helm
    Zip
  • what are you trying to achieve
    Current SQ reported 23097 lines.
    2023-10-24_15-21-44

There are 2 projects from same repo. One project on develop. One on master. Each as 12k.
Why SQ count 24K as both projects are from same repo but different branch.
In document, only largest branch will be counted.
I have pipeline setup to run on different branch. Each branch commit to new project (There will be 1.x and 2.x and they will have different code but in same repo)
Did I do anything wrong?

SonarQube counting LoC cares about projects, not repos. If you’re analyzing different branches, and you’re using a commercial edition, you should use branch analysis to consolidate all branch analyses under one project (where only the largest will count towards your license).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.