Skip to content
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

Add churn option (--ignore_files) #170

Closed
wants to merge 4 commits into from

Conversation

such
Copy link

@such such commented Nov 7, 2013

Allow using --ignore_files option for churn

config.configure_metric(:churn) do |churn|
    churn.ignore_files = %q("Gemfile, Gemfile.lock, config/locales/fr.yml, config/locales/en.yml, db/schema.rb")
end

@@ -56,10 +56,12 @@ def build_churn_options
def has_option?(churn_option)
options.include?(churn_option)
end

def churn_options
{
:minimum_churn_count => '--minimum_churn_count',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're up for it, this looks like a great opportunity to begin work on #167 which is basically to not require code changes for most of a metric's run options, but just to enable passing them through.

For example

:ignore_files => %q("Gemfile, Gemfile.lock, config/locales/fr.yml, config/locales/en.yml, db/schema.rb")

would map to the command-line argument

--ignore_files Gemfile,Gemfile.lock,config/locales/fr.yml,config/locales/en.yml,db/schema.rb

If you chose to do this, please create the options hash with the Map gem, instead of a the hash primitive. (It's included in metric_fu via churn)

@ghost ghost assigned bf4 Nov 7, 2013
@robincurry robincurry closed this Nov 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants