Skip to end of metadata
Go to start of metadata

Upgrade from 0.1 to 0.2

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.

Description / Features

The plugin computes and feeds SonarQubewith 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.

Usage, Installation and Configuration

  1. Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
  2. If you plan to use this plugin with non-maven projects, or SCM access is available only with username/password or no SCM information is included in project's pom.xml you have to also install the SCM Activity plugin 
  3. Restart the SonarQubeserver
  4. 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

  5. Set the SCM user / password (if needed) by setting the sonar.scm.user.secured and sonar.scm.password.secured properties of SCM Activity plugin
  6. Launch a new quality analysis and the metrics will be fed

    Important notice
    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 

     

    mvn sonar:sonar -Dsonar.login=admin -Dsonar.password=admin  

    and in case B (scm properties set directly to analyzer) like this 

     

    mvn sonar:sonar -Dsonar.scm.user.secured=<SCM_USER> -Dsonar.scm.passoword.secured=<SCM_PWD>

Grabbing stats for multiple periods

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


Compatibility Matrix

Plugin version

0.10.2
Source Control  

Subversion

(tick)

(tick)
Git(tick)(tick)
Mercurial(error)(tick)
CVS(error)(tick)

Metrics Definitions

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 Dayscm-commits-per-weekdaynoReports on the number of commits per week day.
Commits Per Monthscm-commits-per-monthnoReports on the number of commits per month.

Future Work (Open Issues)

Plenty !!! Waiting for your ideas as well!

Open Issues (19 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-2601 Add the ability to exclude source code paths from stats Major
New Feature SONARPLUGINS-2325 Support differential views Major
Bug SONARPLUGINS-2713 When overwriting the scm url using the relevant property,the plugin understands the property from parent pom rather than the value of the property. Major
Story SONARPLUGINS-2703 ScmStats Support PTC Integrity CM Major
Bug SONARPLUGINS-2724 if there is no activity during a certain period or there's only one commiter the author's activity is broken Major
Improvement SONARPLUGINS-2714 Add a dropbox in widgets to select period to choose the period instead of having to add 3 different widgets. Major
New Feature SONARPLUGINS-2807 Add the ability to group authors by synonim names Major
Improvement SONARPLUGINS-2746 Git: use .mailmap file to coalesce together commits by the same person Major
Improvement SONARPLUGINS-2825 Use the guessed SCM URL from SCM Activity plugin Major
Bug SONARPLUGINS-2850 ScmStats errors out on Hg repository Major
Improvement SONARPLUGINS-2858 Igonre SCM url from pom.xml if it set in SCM Activity plugin. Major
Wish SONARPLUGINS-2466 Add TFS support to SCM Stats plugin Major
Improvement SONARPLUGINS-2906 Merge multiple users to one Major
Improvement SONARPLUGINS-2907 Show period values in widgets Major
Task SONARPLUGINS-2938 Update description in pom Major
Improvement SONARPLUGINS-2326 Try to remove log messages when getting change log from Subversion SCM Minor
New Feature SONARPLUGINS-2815 Support Developer Cockpit Minor
Improvement SONARPLUGINS-2873 Add Support for Jazz in SCM Stats plugin Minor
New Feature SONARPLUGINS-2771 Add ability to have ignored author(s) Trivial

 

Change Log

Release 0.2 (10 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-2441 Add ability to grab stats for different time periods Major
Bug SONARPLUGINS-2324 Try to read properties sonar.scm.user.secured and sonar.scm.password.secured if SCM Activity is installed. Major
New Feature SONARPLUGINS-2632 Add a new widget Author activity to display in a Stacked 3D Bar additions/modifications/deletions per author Major
Task SONARPLUGINS-2354 Migrate to maven-scm-api 1.8 Major
Improvement SONARPLUGINS-2664 Change parent pom to version 16 Major
New Feature SONARPLUGINS-2438 Add Mercurial Support Major
Improvement SONARPLUGINS-2606 SCM stats is failing when no url defined while ScmActivitySensor was not Major
New Feature SONARPLUGINS-2715 Add CVS Support Major
Bug SONARPLUGINS-2308 Fix the typo at line 18: <system>>Jenkins</system> in pom.xml Trivial
Improvement SONARPLUGINS-2309 Add <issueManagement> information in pom.xml Trivial

Release 0.1 (10 issues)
Type Key Summary Priority
New Feature SONARPLUGINS-2231 Add Localization support Major
New Feature SONARPLUGINS-2230 Add Git support Major
New Feature SONARPLUGINS-2229 Add Subversion support Major
New Feature SONARPLUGINS-2228 Create a new widget to display Commits / Clock Hour in a bar chart Major
New Feature SONARPLUGINS-2227 Create a new widget to display Commits / User in a list and pie chart Major
Bug SONARPLUGINS-2304 Commits/ User widget should display only top 10 commiters Major
New Feature SONARPLUGINS-2241 Create a new widget to display Commits / Month in a bar chart Major
New Feature SONARPLUGINS-2242 Create a new widget to display Commits / Week Day in a bar chart Major
New Feature SONARPLUGINS-2240 Create a project dashboard for all SCM Stats widgets Major
New Feature SONARPLUGINS-2239 Try to read property sonar.scm.url if SCM Activity is installed. Major

Labels
  • None