View Source

{hudson-plugin-info:pluginId=sloccount}
{excerpt}This plugin generates the trend report for [SLOCCount|http://www.dwheeler.com/sloccount/], an open source program which counts the number of lines of codes in over 25 different languages, including C/C++, Ada, COBOL, Fortran, SQL, Ruby, Python, etc...{excerpt}

h1. Description

!sloccount-header.png!

The SLOCCount plug-in scans for SLOCCount report files in the build workspace and reports the number of lines found.

The following features are provided by this plug-in:
* Configuration of the files to scan after a build.
* Trend reports showing the number of lines of codes per language
* Overview of the lines of codes per file, folder or language
* Works with the freestyle build option of Hudson

This plug-in is developed and maintained by Nicolas Piguet. Please use the Hudson [mailing lists|https://hudson.dev.java.net/servlets/ProjectMailingListList] or [issue tracker|https://hudson.dev.java.net/issues/] to ask questions, create feature request or bug reports, since I don't read the comment section on this page regularly.

h1. Usage
# Install [SLOCCount|http://www.dwheeler.com/sloccount/] on the build slave
# For each job configuration page
## Add a *execute shell* build step
## Enter the following shell command: {{/usr/bin/sloccount --duplicates --wide --details \[source-folder\] >\[output-folder\]/sloccount.sc}}
## Activate the checkbox *Publish SLOCCount analysis results*

h1. Change Log

h3. Version 1.4 (Feb 10, 2010)
* Update code for more recent Hudson

h3. Version 1.3 (Jul 7, 2009)
* Made to work with distributed builds ([patch|http://www.nabble.com/sloccount-plugin-and-distributed-builds--%3E-exception-td22791316.html])

h3. Version 1.2
* Clicking on the SLOCCount icon in the left sidebar will now take you directly to the last build's detailed sloccount report instead of that build's general main page

h3. Version 1.1
* Added breadcrumbs to help in the navigation of the result report

h3. Version 1.0

* Initial release