The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.
For a list of other such plugins, see the Pipeline Steps Reference page.
sloccountPublish: Publish Sloccount reports
pattern : String(optional)
encoding : String(optional)
commentIsCode : boolean(optional)
numBuildsInGraph : int(optional)
ignoreBuildFailure : boolean(optional)
step([$class: 'SloccountPublisher']): Publish SLOCCount analysis results
pattern : String
Fileset 'includes' setting that specifies the generated raw SLOCCount or cloc report files, such as '**/sloccount.sc' or '**/cloc.xml'. Basedir of the fileset is the workspace root. If no value is set, then the default '**/sloccount.sc' is used. Be sure not to include any non-report files into this pattern.
The report files must have been generated by sloccount tool using the "--wide --details" options, e.g.
sloccount --duplicates --wide --details SOURCE_DIRECTORY > sloccount.sc
or by cloc tool using the "--by-file --xml" options, e.g.
cloc --by-file --xml --out=cloc.xml SOURCE_DIRECTORY
If you are not sure which type to use, prefer cloc. It is able to detect more programming languages than SLOCCount (Scala, Ant, CSS, ...) and is able to count also lines with comments that often contain Javadoc or Doxygen documentation. Cloc is also better portable, SLOCCount requires cygwin or similar environment under MS Windows.
Never switch between SLOCCount and cloc inside one job. You would end up with messy trend graph because they name programming languages differently. Delete all affected builds and rebuild the job in such case to fix the issue.
encoding : String
commentIsCode : boolean
numBuildsInGraph : int
ignoreBuildFailure : boolean
Please submit your feedback about this page through this quick form.
Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?
See existing feedback here.