Skip to content
jondot edited this page Mar 4, 2011 · 1 revision

The nchurn task will run NChurn on your code repository. This task can be beneficial to use in addition to your code health reporting, whether it is coverage, tests and so on.

NChurn itself is located at http://github.com/jondot/nchurn

Available options:

desc "churn"
nchurn :churn do |nc|
  nc.command = "tools/nchurn/nchurn.exe"
  nc.working_directory = "."
  # here are some examples: 
  # nc.input "file.txt"
  # nc.from DateTime.now #3-12-2010 # Chronic.parse('3 days ago')
  # nc.churn 4
  # nc.churn_precent 30
  # nc.top 10
  # nc.report_as :xml
  # nc.env_path 'c:/tools'
  # nc.adapter :git
  # nc.exclude "exe"
  # nc.include "foo"
  nc.output "out/churn-#{bumper_version.to_s}.txt"
end

Typically under CI you would want to use XML reporting with nc.report_as :xml and nc.output 'build.xml'. You can then supply an XSLT of you own or ones that are provided with NChurn (see NChurn repo).

Clone this wiki locally