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

Parse error "A" with "--rails --only Rails/Date" option #2169

Closed
akicho8 opened this issue Aug 21, 2015 · 1 comment
Closed

Parse error "A" with "--rails --only Rails/Date" option #2169

akicho8 opened this issue Aug 21, 2015 · 1 comment

Comments

@akicho8
Copy link

akicho8 commented Aug 21, 2015

$ echo "A" > a.rb
$ rubocop -d --rails --only Rails/Date a.rb
Inspecting 1 file
Scanning /private/tmp/a.rb
For /private/tmp: configuration from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/config/default.yml
Inheriting configuration from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/config/enabled.yml
Inheriting configuration from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/config/disabled.yml
An error occurred while Rails/Date cop was inspecting /private/tmp/a.rb.
undefined method `send_type?' for nil:NilClass
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/cop/rails/date.rb:99:in `method_send?'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/cop/rails/date.rb:51:in `on_const'
(eval):5:in `block (2 levels) in on_const'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/cop/commissioner.rb:92:in `with_cop_error_handling'
(eval):4:in `block in on_const'
(eval):2:in `each'
(eval):2:in `on_const'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/cop/commissioner.rb:52:in `investigate'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/cop/team.rb:33:in `inspect_file'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:135:in `inspect_file'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:106:in `block in do_inspection_loop'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:100:in `loop'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:100:in `do_inspection_loop'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:78:in `process_file'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:53:in `block in inspect_files'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:51:in `each'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:51:in `inspect_files'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:30:in `run'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/cli.rb:26:in `run'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/bin/rubocop:13:in `block in <top (required)>'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/bin/rubocop:12:in `<top (required)>'
/usr/local/var/rbenv/versions/2.2.3/bin/rubocop:23:in `load'
/usr/local/var/rbenv/versions/2.2.3/bin/rubocop:23:in `<main>'
.

1 file inspected, no offenses detected

1 error occurred: 
An error occurred while Rails/Date cop was inspecting /private/tmp/a.rb.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
Mention the following information in the issue report: 
0.33.0 (using Parser 2.2.2.6, running on ruby 2.2.3 x86_64-darwin13)
Finished in 0.10695106885395944 seconds
@akicho8
Copy link
Author

akicho8 commented Aug 21, 2015

Thanks 👍

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

No branches or pull requests

1 participant