Reputation: 932
How can I get the numeric value of a metric in SonarQube?
For example: <%= format_measure('ncloc') -%> will display the number of lines of code.
But I need to get the value (number of lines) in some variable to process further.
Thanks in advance.
Upvotes: 0
Views: 112
Reputation: 994
Project Dashboards are dropped in SonarQube 6.1. I suggest to not put too much effort on writing widgets.
Moreover, Ruby code is being dropped and we don't know yet how it will be replaced or if it will be. I've notified our documentation team to make things clearer.
Regarding your question, you can assign the result of format_measure(…)
to a variable and do whatever you want in Ruby.
Upvotes: 1