We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello I'm getting this error:
An error occurred while Style/StabbyLambdaParentheses cop was inspecting xxxxx.rb
The code causing this error is below:
def localize_value(value) case value when lambda(&:nil?) # <-- this line is causing the error value ... else value end end
Here is the backtrace
Inspecting 1 file Scanning /home/juris/src/expert/lib/version_change_formatter.rb For /home/juris/src/expert: configuration from /home/juris/src/expert/.rubocop.yml Inheriting configuration from /home/juris/src/expert/.rubocop_todo.yml Default configuration from /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/config/default.yml Inheriting configuration from /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/config/enabled.yml Inheriting configuration from /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/config/disabled.yml An error occurred while Style/StabbyLambdaParentheses cop was inspecting /home/juris/src/expert/lib/version_change_formatter.rb. undefined method `begin' for #<Parser::Source::Map::Variable:0x00000002364690> /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/style/stabby_lambda_parentheses.rb:103:in `parentheses?' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/style/stabby_lambda_parentheses.rb:30:in `on_send' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:37:in `block (2 levels) in on_send' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:87:in `with_cop_error_handling' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:36:in `block in on_send' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:34:in `each' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:34:in `on_send' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:276:in `block in process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `map' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/parser-2.2.3.0/lib/parser/ast/processor.rb:9:in `process_regular_node' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:41:in `on_when' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:276:in `block in process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `map' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/parser-2.2.3.0/lib/parser/ast/processor.rb:9:in `process_regular_node' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:41:in `on_case' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/parser-2.2.3.0/lib/parser/ast/processor.rb:122:in `on_def' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:41:in `on_def' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:276:in `block in process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `map' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/parser-2.2.3.0/lib/parser/ast/processor.rb:9:in `process_regular_node' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:41:in `on_begin' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:276:in `block in process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `map' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/parser-2.2.3.0/lib/parser/ast/processor.rb:9:in `process_regular_node' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:41:in `on_class' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:53:in `investigate' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/team.rb:34:in `inspect_file' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/runner.rb:190:in `inspect_file' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/runner.rb:157:in `block in do_inspection_loop' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/runner.rb:151:in `loop' Inspecting 1 file Scanning /home/juris/src/expert/lib/version_change_formatter.rb For /home/juris/src/expert: configuration from /home/juris/src/expert/.rubocop.yml Inheriting configuration from /home/juris/src/expert/.rubocop_todo.yml Default configuration from /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/config/default.yml Inheriting configuration from /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/config/enabled.yml Inheriting configuration from /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/config/disabled.yml An error occurred while Style/StabbyLambdaParentheses cop was inspecting /home/juris/src/expert/lib/version_change_formatter.rb. undefined method `begin' for #<Parser::Source::Map::Variable:0x00000002364690> /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/style/stabby_lambda_parentheses.rb:103:in `parentheses?' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/style/stabby_lambda_parentheses.rb:30:in `on_send' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:37:in `block (2 levels) in on_send' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:87:in `with_cop_error_handling' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:36:in `block in on_send' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:34:in `each' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:34:in `on_send' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:276:in `block in process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `map' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/parser-2.2.3.0/lib/parser/ast/processor.rb:9:in `process_regular_node' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:41:in `on_when' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:276:in `block in process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `map' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/parser-2.2.3.0/lib/parser/ast/processor.rb:9:in `process_regular_node' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:41:in `on_case' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/parser-2.2.3.0/lib/parser/ast/processor.rb:122:in `on_def' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:41:in `on_def' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:276:in `block in process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `map' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/parser-2.2.3.0/lib/parser/ast/processor.rb:9:in `process_regular_node' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:41:in `on_begin' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:276:in `block in process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `map' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:275:in `process_all' /home/juris/.rvm/gems/ruby-2.2.3/gems/parser-2.2.3.0/lib/parser/ast/processor.rb:9:in `process_regular_node' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:41:in `on_class' /home/juris/.rvm/gems/ruby-2.2.3/gems/ast-2.1.0/lib/ast/processor/mixin.rb:259:in `process' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/commissioner.rb:53:in `investigate' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/cop/team.rb:34:in `inspect_file' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/runner.rb:190:in `inspect_file' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/runner.rb:157:in `block in do_inspection_loop' /home/juris/.rvm/gems/ruby-2.2.3/gems/rubocop-0.35.1/lib/rubocop/runner.rb:151:in `loop'
The text was updated successfully, but these errors were encountered:
0a6e992
Merge pull request #2477 from lumeet/stabby_lambda_keyword
dadd2c3
[Fix #2449] Fix StabbyLambdaParentheses with lambda
No branches or pull requests
Hello I'm getting this error:
An error occurred while Style/StabbyLambdaParentheses cop was inspecting xxxxx.rb
The code causing this error is below:
Here is the backtrace
The text was updated successfully, but these errors were encountered: