Hi all, I'm new to ruby/rails and just started using metric_fu for our project. I found it difficult to figure out how to configure metric_fu. The links from github and several other sites that should take you to "configuration options" go to this page which appears obsolete and doesn't have config specifics:
http://metric-fu.rubyforge.org/
My goal was to raise the threshold for Cane warnings about line length from 80 to 110, since we commonly have line overruns and don't want to see this warning. I found no documentation on how to do this and had to hunt through source code. I ended up with something that works:
.metrics file
MetricFu::Configuration.run do |config|
config.configure_metric(:cane) do |cane|
cane.line_length = 110
end
end
The parameter name was not the same as what Cane expects on the command line (--style-measure) so it wasn't obvious. To help other newbies, it would be good to have a document pointing at the right places to look for configuration options.
My remaining question now is this: to provide for Jenkins integration, it seems that I have to commit the .metrics file to my project repository. I prefer to avoid committing test-related files but in this case I'm not sure how to avoid that. It seems the file must exist in the project root directory for metric_fu to pick it up. Is there another way? Some environment variable setting perhaps? Or a command-line argument to metric_fu to tell it where to look for .metrics file?
Thanks,
Daria.