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

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to