Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 30 Next »

Upgrade from 0.1 to 0.2 or later

If you upgrade from 0.1 to 0.2 or later you'll need to run a new analysis to see the Authors activity and commits per author widgets.

Description / Features

The plugin computes and feeds SonarQube with four new metrics : Commits / Author, Commits / Clock Hour, Commits / Week Day and Commits / Month.
Five project widgets ( under the SCM category ) display these metrics using graphical representations.

Icon

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 showing the top 10 authors activity types: new files(green), modifications(blue) , deletions(red)

 

The other three widgets display bar charts for the number of commits / clock hour, week day or month.

Icon

The plugin also adds a project dashboard under the name SCM Stats that contains all four widgets.

Requirements

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 must also install the SCM Activity plugin.

Compatibility Matrix:

Plugin version

0.10.20.3.1
Source Control   

Subversion

(tick)

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

(tick) (Authors activity not supported
see SONARPLUGINS-3108 )

(tick) (Authors activity not supported
see SONARPLUGINS-3108 )
CVS(error)(tick) (Authors activity not supported
see SONARPLUGINS-3104 )
(tick) (Authors activity not supported
see SONARPLUGINS-3104 )
Perforce(error)(error)(tick)
Jazz(error)(error)(question)

(tick) - supported

(star) - tested by users

(question) - not tested

(error) - not implemented

Installation

  1. Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
  2. Restart the SonarQube server

Usage and Configuration

  1. 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

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

    Security note for SonarQube 3.4.0 to 3.6.3 included

    Icon

    For the *.secured properties to be read during the project analysis, it is necessary to set the sonar.login and sonar.password properties to the credentials of a user that is:

    • System administrator
    • And project administrator on the project that is being analyzed
    Example:
    sonar-runner -Dsonar.login=admin -Dsonar.password=admin

Grabbing stats for multiple periods

Since version 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. Stats for the entire history of a project 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.


Ignoring / merging authors

Since version 0.3, the plugin allows you to set a list of authors to ignore (sonar.scm-stats.authors.ignore) and a list of author name synonyms to merge into single authors (sonar.scm-stats.authors.merge).
If you want to set them using the project / global settings, add one author (ignored or merged) in each value.
If you want to pass them as analysis arguments, authors must be comma-delimited.
Example for ignored authors: -Dsonar.scm-stats.authors.ignore=author1,author2,author3

Example for merged authors: -Dsonar.scm-stats.authors.merge="author1=author;AUTHOR1,author2=author22;Author2;authOr2"

Perforce Configuration

Perforce is supported since version 0.3 and you need to set the Client Spec name property (sonar.scm-stats.perforce.clientspecin order to be able to get scm stats

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!

Loading

Open Issues (19 issues)

T Key Summary P
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
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
New Feature SONARPLUGINS-3197 Add the ability to use native java implementation for SVN instead of using the SVN command line tool Major
Improvement SONARPLUGINS-3157 Add a widget with lines of code / submitter - author Major
Improvement SONARPLUGINS-3152 Add debug logging message to easy identify problematic cases Major
Bug SONARPLUGINS-3104 Authors activity widget is empty when analyzing a project hosted in CVS Major
New Feature SONARPLUGINS-2325 Support differential views Major
Improvement SONARPLUGINS-3589 Guess the SCM Url when using SVN Major
Improvement SONARPLUGINS-3502 Add the ability to read scm authors ignoring case sensitivity Major
Improvement SONARPLUGINS-2746 Git: use .mailmap file to coalesce together commits by the same person Major
Wish SONARPLUGINS-2466 Add TFS support to SCM Stats plugin Major
Bug SONARPLUGINS-3784 Authors list in SCM Top 10 Authors widget in sorted incorrectly Major
Improvement SONARPLUGINS-3848 Suport Jazz RTC 4.0 Major
Bug SONARPLUGINS-3856 Unable to parse log output if developer use a customized template Major
New Feature SONARPLUGINS-2815 Support Developer Cockpit Minor
Improvement SONARPLUGINS-3742 SCM change log collection pollutes maven build output Minor
Improvement SONARPLUGINS-2326 Try to remove log messages when getting change log from Subversion SCM Minor

 

Change Log

Loading

Release 0.3.1 (bug-fix release) (1 issues)

 

Loading

Release 0.3 (11 issues)

 

Loading

Release 0.2 (10 issues)

  • No labels