You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ rubocop -d /tmp/test.rb
Inspecting 1 file
Scanning /tmp/test.rb
For /tmp: configuration from /Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/config/default.yml
Inheriting configuration from /Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/config/enabled.yml
Inheriting configuration from /Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/config/disabled.yml
Default configuration from /Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/config/default.yml
Inheriting configuration from /Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/config/enabled.yml
Inheriting configuration from /Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/config/disabled.yml
An error occurred while Style/Next cop was inspecting /tmp/test.rb.
undefined method `type' for nil:NilClass
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/next.rb:76:in `simple_if_without_break?'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/next.rb:64:in `ends_with_condition?'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/next.rb:37:in `on_block'
(eval):5:in `block (2 levels) in on_block'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/commissioner.rb:98:in `with_cop_error_handling'
(eval):4:in `block in on_block'
(eval):2:in `each'
(eval):2:in `on_block'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/ast-2.0.0/lib/ast/processor.rb:239:in `process'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/commissioner.rb:58:in `investigate'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/team.rb:33:in `inspect_file'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/runner.rb:87:in `inspect_file'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/runner.rb:69:in `block in process_file'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/runner.rb:64:in `loop'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/runner.rb:64:in `process_file'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/runner.rb:27:in `block in run'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/runner.rb:25:in `each'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/runner.rb:25:in `run'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cli.rb:24:in `run'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/bin/rubocop:14:in `block in <top (required)>'
/Users/ojab/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/bin/rubocop:13:in `<top (required)>'
/Users/ojab/.rvm/gems/ruby-2.1.2/bin/rubocop:23:in `load'
/Users/ojab/.rvm/gems/ruby-2.1.2/bin/rubocop:23:in `<main>'
/Users/ojab/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/Users/ojab/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
W
Offenses:
/tmp/test.rb:1:14: W: Lint/UnusedBlockArgument: Unused block argument - x. You can omit the argument if you don't care about it.
[1].each do |x|
^
/tmp/test.rb:2:10: W: Lint/LiteralInCondition: Literal false appeared in a condition.
unless false
^^^^^
1 file inspected, 2 offenses detected
1 error occurred:
An error occurred while Style/Next cop was inspecting /tmp/test.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.24.0 (using Parser 2.2.0.pre.3, running on ruby 2.1.2 x86_64-darwin13.0)
Finished in 0.033318 seconds
The text was updated successfully, but these errors were encountered:
Style/Next cop crashes with
The text was updated successfully, but these errors were encountered: