Skip to content

Add :ignore_routes option to skip routes which should not be annotated based on regex #315

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

Merged
merged 1 commit into from
Jan 11, 2016
Merged

Add :ignore_routes option to skip routes which should not be annotated based on regex #315

merged 1 commit into from
Jan 11, 2016

Conversation

mintuhouse
Copy link
Contributor

I use to skip routes which generate an annotation which includes local path e.g.,

#     /mobile       #<Rack::Builder:0x0000000a2ff800 @run=Mobile::Dispatch, @map=nil, @use=[#<Proc:0x0000000a30e2d8@/home/hasan/.rvm/gems/ruby-2.1.7@gogo/gems/rack-1.5.5/lib/rack/builder.rb:86>]>
#     /resque       #<Resque::Server app_file="/home/hasan/.rvm/gems/ruby-2.1.7@gogo/gems/resque-1.25.2/lib/resque/server.rb">

which causes a file change after every annotate run - leading to bad churn on codeclimate

add ignore_routes: "#<" to config options to skip such routes

@@ -178,6 +178,10 @@ OptionParser.new do |opts|
ENV['ignore_columns'] = regex
end

opts.on('-I', '--ignore-routes REGEX', "don't annotate routes that match a given REGEX (i.e., `annotate -I '(mobile|resque|pghero)'`" ) do |regex|
Copy link
Owner

Choose a reason for hiding this comment

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

It looks like "-I" is already used. Can we just use the long form to avoid conflict?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed and squashed the commits

ctran added a commit that referenced this pull request Jan 11, 2016
Add :ignore_routes option to skip routes which should not be annotated based on regex
@ctran ctran merged commit 64b1a34 into ctran:develop Jan 11, 2016
@ctran
Copy link
Owner

ctran commented Jan 11, 2016

Thanks.

@mintuhouse mintuhouse deleted the feature_ignore_routes_develop branch April 12, 2017 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants