On Thu, 12 May 2011 18:40:56 -0700, Michael Kincaid wrote: > > Currently if you run rake metrics:all on puppet, you get no results from flay > (the metric that looks for code duplication), because it apparently assumes a > blank set of target directories unless told otherwise. This patch adds the > necessary configuration to the rake task. (Are there any others that need to > be included in metrics besides 'lib'?) > > Signed-off-by: Michael Kincaid <[email protected]> > --- > tasks/rake/metrics.rake | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/tasks/rake/metrics.rake b/tasks/rake/metrics.rake > index 63af552..964a0b8 100644 > --- a/tasks/rake/metrics.rake > +++ b/tasks/rake/metrics.rake > @@ -1,5 +1,8 @@ > begin > require 'metric_fu' > + MetricFu::Configuration.run do |config| > + config.flay = { :dirs_to_flay => ['lib'] } > + end > rescue LoadError > # Metric-fu not installed > # http://metric-fu.rubyforge.org/ > -- > 1.7.4.1 >
While the diff definitely does what you intend to do (configure flay), I don't see how it would fix running `rake metrics:all`, since as far as I can tell there is no such rake task (and never was). So, I don't know how metrics:all ever worked since tasks/rake/metrics.rake doesn't actually add any new tasks, and I can't find where any metrics related tasks are defined. Also, that commit message definitely should be hard line-wrapped. -- Jacob Helwig
signature.asc
Description: Digital signature
