Can Modify Portfolio to read LOC other then Main Branch

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): 8.6.1
  • what are you trying to achieve: Trying to get Total LOC.
  • what have you tried so far to achieve this: Got LOC but few project doesn’t have main branch so count doesn’t match with Total LOC showing in License Manager.

can we modify portfolio in such a way so it can read LOC from other branches(if main branch is not scanned).

Thank You,

Hi Lalit,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.6.1 → 8.9.6 → 9.2.4 (last step optional)

You may find the Upgrade Guide helpful.

Once you’re on a supported version it will be easy to move to 9.3 when it’s released at the end of the month. It will include the ability to create portfolios of branches. However, even then I’m not certain it will be what you want.

Can you provide more detail on why you’re trying to track LoC via a Portfolio?


For reporting purpose we are trying to number of LOC per Portfolio, which is not matching with Total number of License due to Main branch not scanned.
so wanted to check what can be done here.


Well, you’ll soon have the ability to pick project branches for a portfolio, but I don’t think it will accomplish your goal. That’s because your branch choice will be static, and if another project branch gets bigger than the one you picked, your numbers again won’t match.

That said, a LoC Licensing report is currently in specification and we’re hoping to include it in 9.4.