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
Layout/LineLength error #7759
Labels
Comments
8 tasks
koic
added a commit
to koic/rubocop
that referenced
this issue
Feb 26, 2020
Fixes rubocop#7759. This PR fixes the following error for `Layout/LineLength` cop when using lambda syntax that argument is not enclosed in parentheses. ```ruby % cat example.rb -> x {} ``` ```console % bundle exec rubocop --only Layout/LineLength -d (snip) An error occurred while Layout/LineLength cop was inspecting /Users/koic/src/github.com/koic/rubocop-issues/7759/example.rb:1:0. undefined method `begin_pos' for nil:NilClass /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cop/layout/line_length.rb:127:in `check_for_breakable_block' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cop/layout/line_length.rb:71:in `on_block' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cop/commissioner.rb:57:in `block (2 levels) in trigger_responding_cops' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cop/commissioner.rb:136:in `with_cop_error_handling' ```
bbatsov
pushed a commit
that referenced
this issue
Feb 29, 2020
Fixes #7759. This PR fixes the following error for `Layout/LineLength` cop when using lambda syntax that argument is not enclosed in parentheses. ```ruby % cat example.rb -> x {} ``` ```console % bundle exec rubocop --only Layout/LineLength -d (snip) An error occurred while Layout/LineLength cop was inspecting /Users/koic/src/github.com/koic/rubocop-issues/7759/example.rb:1:0. undefined method `begin_pos' for nil:NilClass /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cop/layout/line_length.rb:127:in `check_for_breakable_block' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cop/layout/line_length.rb:71:in `on_block' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cop/commissioner.rb:57:in `block (2 levels) in trigger_responding_cops' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/cop/commissioner.rb:136:in `with_cop_error_handling' ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Same as
Actual behavior
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: