Organization LOC history

Hi, how to get a Organization analysed LOC history?

I’d like to have at least a number of total LOC analysed per each month, better if per project.

Is there available such a feature?

Hi,

Sorry, but that’s not available. Would you mind explaining why you want it?

 
Thx,
Ann

Hi @ganncamp, thank you for your reply.

Sure, mainly to do statistics for planning purposes.

From an organization perspective, knowing how much is analyzed each month according to certain work rhythms, can help to plan expenditures for purchasing different tiers, or possible extensions to other macro projects.
Another of the added values of using a great tool like SonarCloud in the enterprise is being able to do quality analysis on different repositories in the same organization. Each repository, however, has its own weight on the tier and therefore different costs, so having simple centralized statistics of monthly usage might help.

What’s your opinion about that? :slight_smile:

1 Like

Hi,

My opinion is that this sounds very valid. Now lets see what the Product Managers think when they show up here.

 
:smiley:
Ann

1 Like

Hello @gianfaProm ,

You can get this information on the activity page of any of your projects. For example, this is what it looks like on one of our open source projects: SonarCloud . On the activity page, you have to select “Custom” and then add the metric “Lines of code”.

Please let me know if this is what you were looking for.

Hi @Martin_Bednorz ,
thank you very much for your reply. I think it’s not what I’m looking for, although maybe it might be me not experienced enough.

I will list my naive feedback here.

  • Yes, I confirm that each project contains a metrics and build history panel, which gives a very good view of the individual build or metric.
  • In the activity panel I am having trouble interpreting: the blue line refers to the total LOCs analyzed up to the time of the single line right (a cumulative plot)?
  • If the answer to the previous question is yes, it is not easy for me to find a net difference of only those analyzed between one date and another. I recognize that just making a subtraction is enough, but having to automatize this for N projects in an organization requires me to create a script that via Web API does this. Doable, but it would be nice to have a panel of absolute LOC statistics by month, for the organization, since that is the magnitude from which everything is derived.

I would like to emphasize how much it would be appreciated to have a centralized place that summarizes certain measures at the organization level, to do comparative analysis. This is somewhat reminiscent of your “Filters” side bar, but that one does not do a true comparison between projects.
No need for analytics (but enormously desirable :smiley: ), even a table with absolute LOCs by month for all projects would be enough to make it enormously easy to use across the company.

Sorry for the length of the message. If I misuse sonarcloud please feel free to suggest how to use it better.
And thanks again for your helpfulness :slight_smile:

The chart I’ve shared above (this link) shows the lines of code analyzed on the main branch, but is not cumulative. It just shows the amount of LOC the main branch had at a particular date/analysis.

I’ll add this as feedback internally. You might be interested in following the following portal card as it might add some form of higher-level view: https://portal.productboard.com/sonarsource/1-sonarcloud/c/413-aggregated-view-on-your-projects-with-portfolios .

Hi Martin , thank you for your reply

The chart I’ve shared above (this link) shows the lines of code analyzed on the main branch, but is not cumulative. It just shows the amount of LOC the main branch had at a particular date/analysis.

Thanks for the clarification, but more specifically does it report:

  1. the LOCs analyzed on the specific date,
  2. or the main branch LOCs on the specific date?

I ask because I would expect that they were not the same thing, since the former are subject to conditions of new code definition, inclusion/exclusion, etc… while the latter are just the LOCs accounted for from files. Excuse me if I am misunderstanding something that you take for granted.

I’ll add this as feedback internally. You might be interested in following the following portal card as it might add some form of higher-level view: https://portal.productboard.com/sonarsource/1-sonarcloud/c/413-aggregated-view-on-your-projects-with-portfolios .

Thank you very much!

You can find some of that information on this documentation page. The following things are not taken into account when calculating the LOC:

  • Test code
  • Files excluded from analysis
  • Code in unsupported languages
  • Comments or blank lines
  • Code from public projects within your organization

oh, I see, now it looks more clear to me. Thank you! :slight_smile: