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

Style/LineLength crashes #1188

Closed
ojab opened this issue Jul 2, 2014 · 1 comment · Fixed by #1192
Closed

Style/LineLength crashes #1188

ojab opened this issue Jul 2, 2014 · 1 comment · Fixed by #1192

Comments

@ojab
Copy link
Contributor

ojab commented Jul 2, 2014

rubocop Style/LineLength crashes when parsing xxxxxxxxxxxxxxxxxxxxxxxxxxxxzxxxxxxxxxxx = LDAP::DEFAULT_GROUP_UNIQUE_MEMBER_LIST_KEY line

$ 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
An error occurred while Style/LineLength cop was inspecting /tmp/test.rb.
undefined method `[]' for nil:NilClass
/Users/ojab/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/uri/ldap.rb:121:in `parse_dn'
/Users/ojab/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/uri/ldap.rb:115:in `initialize'
/Users/ojab/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/uri/common.rb:214:in `new'
/Users/ojab/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/uri/common.rb:214:in `parse'
/Users/ojab/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/uri/common.rb:747:in `parse'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/line_length.rb:80:in `valid_uri?'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/line_length.rb:71:in `block in match_uris'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/line_length.rb:66:in `loop'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/line_length.rb:66:in `match_uris'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/line_length.rb:55:in `find_excessive_uri_range'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/line_length.rb:20:in `block in investigate'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/line_length.rb:16:in `each'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/line_length.rb:16:in `each_with_index'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/style/line_length.rb:16:in `investigate'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/commissioner.rb:92:in `block (2 levels) in invoke_custom_processing'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/commissioner.rb:98:in `with_cop_error_handling'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/commissioner.rb:91:in `block in invoke_custom_processing'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/commissioner.rb:82:in `each'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/commissioner.rb:82:in `invoke_custom_processing'
/Users/ojab/.rvm/gems/ruby-2.1.2/gems/rubocop-0.24.0/lib/rubocop/cop/commissioner.rb:56: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:1: W: Lint/UselessAssignment: Useless assignment to variable - xxxxxxxxxxxxxxxxxxxxxxxxxxxxzxxxxxxxxxxx.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxzxxxxxxxxxxx = LDAP::DEFAULT_GROUP_UNIQUE_MEMBER_LIST_KEY
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/tmp/test.rb:2:1: C: Style/TrailingBlankLines: 1 trailing blank lines detected.

1 file inspected, 2 offenses detected

1 error occurred:
An error occurred while Style/LineLength 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.025887 seconds
@yujinakayama
Copy link
Collaborator

Thanks for the report. I'll take a look.

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 a pull request may close this issue.

2 participants