{iframe:src=http://update.sonarsource.org/plugins/scmstats.html|width=700|height=250|frameborder=0}
Your browser does not support iframes.
{iframe} |
If you upgrade from 0,1 to 0.2 you'll need to run a new analysis to see the widgets of authors activity and commits per author.
The plugin computes and feeds Sonar with four (4) new metrics : Commits / Author, Commits / Clock Hour, Commits / Week Day and Commits / Month.
Five(5) project widgets ( under the SCM category ) display these metrics using graphical representations.
The "commits per author widget" displays only the top 10 authors ( list and pie chart ) |

The "Author activity" widget (available since version 0.2) displays a stacked 3D bar chart about top 10 authors activities types : New files(green), modifications(blue) , deletions(red)
The other three widgets display in a bar chart the number of commits / clock hour, week day or month.

The plugin also adds a project dashboard under the name SCM Stats that contains all four widgets. |
Set the SCM URL of your project (see SCM URL Format) by setting the sonar.scm.url property of SCM Activity plugin. For Maven projects this is automatically discovered if it's already set in pom.xml
Launch a new quality analysis and the metrics will be fed
The sonar.scm.user.secured and sonar.scm.password.secured properties end with secured which means that we need to authenticate the analyzer to use them. So you have two possible solutions. A: If you've set these properties at project or global settings then use/set the sonar.login and sonar.password properties in your analyzer to authenticate it. B: You can set sonar.scm.user.secured and sonar.scm.password.secured properties directly in your analyzer wihtout specifying the sonar.login and sonar.password properties. For example if you use maven then in case A (scm properties set in project/global settings) the maven cmd could be like this
and in case B (scm properties set directly to analyzer) like this
|
Since 0.2 the plugin allows the collection of SCM stats for multiple (1-3) periods. By default the plugin collects stats for the whole history ( sonar.scm-stats.period1 = 0 days ).
You can have different periods on a global or project level by setting the number of days prior to the current date that the plugin will collect scm stats.
For example to collect scm stats for the last month, enter a value of 30, for the last week a value of 7 etc.
The properties for period 2 ( sonar.scm-stats.period2 ) and period 3 ( sonar.scm-stats.period3 ) can have the value of zero(0) but the plugin will ignore it. In other words, whole history stats, will be collected only if sonar.scm-stats.period1 property is set to zero(0). Negative values are ignored for all periods.
You can edit widget properties by setting the period number (acceptable value are 1-3). By default each widget shows stats for period 1

Plugin version | 0.1 | 0.2 |
|---|---|---|
| Source Control | ||
| ||
| Git | ||
| Mercurial | ||
| CVS |
Name | Key | Qualitative | Description |
|---|---|---|---|
Commits Per Author | scm-commits-per-user | no | Reports on the number of commits per author. |
Commits Per Clock Hour | scm-commits-per-clockhour | no | Reports on the number of commits per clock hour. |
| Commits Per Week Day | scm-commits-per-weekday | no | Reports on the number of commits per week day. |
| Commits Per Month | scm-commits-per-month | no | Reports on the number of commits per month. |
Plenty !!! Waiting for your ideas as well!