-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map metric config options directly onto the metric #167
Comments
can you explain a bit more... does this mean for libs like churn... metric_fu churn config would be something like {:ignore_files => "files, to, ignore", : start_date => "6 months ago"} that would turn into churn cmd while something we use programmatically we would just past the config options straight through to the tools class options? |
@danmayer yes, that's ultimately the goal, to pass the options through to the library (some gems aren't easily used as libraries and some I/we just haven't sought out yet to check if it works just as well. In any case, unless a gem library has a documented internal api, I think we should rely on the 'documented' api for how to pass options from metric fu. |
OK yeah makes sense... Want me to send a PR your way moving from using churn on cmd line to using the ChurnCalculator class directly. Should be something like
If you think that makes sense I could likely get to that late this week or next weekend |
Sorry due to some crazy outages at work this week I am braindead and can't work on this this weekend. I can try again next week. Sorry about that, but this is still on my radar. |
@danmayer sure |
I think this PR should cover the direct mapping for churn |
I'm really looking hard at @davetron5000's GLI, intro |
e.g. if reek takes a --config flag, map a reek :config option's value onto the --config flag.
Similarly, remove options that don't map directly onto the metric, or have a separate way to specify them.
This should be true whether the metric is run as a library or externally.
The text was updated successfully, but these errors were encountered: