-
Notifications
You must be signed in to change notification settings - Fork 64
NChurn
Run NChurn on your repository. This task can be beneficial to use in addition to your code health reporting, whether it is coverage, tests and so on.
desc "Check the churn on this repository"
nchurn :churn do |cmd|
cmd.command = "path/to/nchurn"
cmd.input = "path/to/input"
cmd.output = "path/to/output"
cmd.from = (DateTime.now - 3) #=> 3 days ago
cmd.churn = 4
cmd.top = 10
cmd.report_as = :xml
cmd.env_paths = ["some/bin/path"]
cmd.adapter = :git
cmd.exclude = "exe"
cmd.include = "foo"
end
The location of the nchurn command line application.
command = "path/to/nchurn"
Get input from a file instead of a revision system query.
input = "path/to/input"
You should specify the correct revision system: :auto
(default), :tfs
, :svn
, :git
, :hg
.
adapter = :git
Output to the specified file in one of the supported styles: :table
(default), :xml
, :csv
.
report_as = :xml
output = "path/to/output"
Past date to calculate churn (we will format a proper Ruby DateTime
).
from = (DateTime.now - 3) #=> 3 days ago
Minimal churn or a churn percentage, but not both, please.
churn = 4
churn_precent = 30
Return this number of records.
top = 10
Add these paths to your environment's PATH
, to access tools, like svn.exe
.
env_paths = ["some/bin/path"]
Exclude and/or include resources using these wildcards or regexps.
exclude = "exe"
include = "foo"
Typically, under CI, you would want to use XML reporting with an XSLT, either one of your own or one provided.
report_as = :xml
output = "path/to/output"