-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Performance/RedundantMerge backtrace #67
Labels
bug
Something isn't working
Comments
koic
added a commit
to koic/rubocop-performance
that referenced
this issue
Jul 11, 2019
Fixes rubocop#67. This PR fixes an error for `Performance/RedundantMerge` when `MaxKeyValuePairs` option is set to `null`. ```yaml require: rubocop-performance Performance/RedundantMerge: Enabled: true MaxKeyValuePairs: null ``` ```console % bundle exec rubocop --only Performance/RedundantMerge -d For /private/tmp/67: configuration from /private/tmp/67/.rubocop.yml configuration from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/config/default.yml configuration from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/config/default.yml Default configuration from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-0.72.0/config/default.yml Inspecting 2 files Scanning /private/tmp/67/Gemfile .Scanning /private/tmp/67/example.rb An error occurred while Performance/RedundantMerge cop was inspecting /private/tmp/67/example.rb:23:2. can't convert nil into Integer /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:135:in `Integer' /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:135:in `max_key_value_pairs' /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:74:in `non_redundant_pairs?' /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:68:in `non_redundant_merge? ``` As with `Width` option of `IndentationWidth` cop, value of default.yml is specified as the default value. - https://github.com/rubocop-hq/rubocop-performance/blob/v1.4.0/lib/rubocop/cop/performance/redundant_merge.rb#L131 - https://github.com/rubocop-hq/rubocop/blob/v0.72.0/config/default.yml#L794-L801
koic
added a commit
to koic/rubocop-performance
that referenced
this issue
Jul 11, 2019
Fixes rubocop#67. This PR fixes an error for `Performance/RedundantMerge` when `MaxKeyValuePairs` option is set to `null`. ```yaml require: rubocop-performance Performance/RedundantMerge: Enabled: true MaxKeyValuePairs: null ``` ```console % bundle exec rubocop --only Performance/RedundantMerge -d For /private/tmp/67: configuration from /private/tmp/67/.rubocop.yml configuration from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/config/default.yml configuration from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/config/default.yml Default configuration from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-0.72.0/config/default.yml Inspecting 2 files Scanning /private/tmp/67/Gemfile .Scanning /private/tmp/67/example.rb An error occurred while Performance/RedundantMerge cop was inspecting /private/tmp/67/example.rb:23:2. can't convert nil into Integer /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:135:in `Integer' /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:135:in `max_key_value_pairs' /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:74:in `non_redundant_pairs?' /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:68:in `non_redundant_merge? ``` As with `Width` option of `IndentationWidth` cop, value of default.yml is specified as the default value. - https://github.com/rubocop-hq/rubocop-performance/blob/v1.4.0/lib/rubocop/cop/performance/redundant_merge.rb#L131 - https://github.com/rubocop-hq/rubocop/blob/v0.72.0/config/default.yml#L794-L801
8 tasks
koic
added a commit
to koic/rubocop-performance
that referenced
this issue
Jul 11, 2019
Fixes rubocop#67. This PR fixes an error for `Performance/RedundantMerge` when `MaxKeyValuePairs` option is set to `null`. ```yaml require: rubocop-performance Performance/RedundantMerge: Enabled: true MaxKeyValuePairs: null ``` ```console % bundle exec rubocop --only Performance/RedundantMerge -d For /private/tmp/67: configuration from /private/tmp/67/.rubocop.yml configuration from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/config/default.yml configuration from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/config/default.yml Default configuration from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-0.72.0/config/default.yml Inspecting 2 files Scanning /private/tmp/67/Gemfile .Scanning /private/tmp/67/example.rb An error occurred while Performance/RedundantMerge cop was inspecting /private/tmp/67/example.rb:23:2. can't convert nil into Integer /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:135:in `Integer' /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:135:in `max_key_value_pairs' /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:74:in `non_redundant_pairs?' /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-performance-1.4.0/lib/rubocop/cop/performance/redundant_merge.rb:68:in `non_redundant_merge? ``` As with `Width` option of `IndentationWidth` cop, value of default.yml is specified as the default value. - https://github.com/rubocop-hq/rubocop-performance/blob/v1.4.0/lib/rubocop/cop/performance/redundant_merge.rb#L131 - https://github.com/rubocop-hq/rubocop/blob/v0.72.0/config/default.yml#L794-L801
koic
added a commit
that referenced
this issue
Jul 12, 2019
[Fix #67] Fix an error for `Performance/RedundantMerge`
This issue has been resolved RuboCop Performance 1.4.1 has been released. |
koic
added a commit
to koic/rubocop-performance
that referenced
this issue
Jul 30, 2019
Follow up rubocop#68 (comment). rubocop#68 didn't solve an issue rubocop#67 with `Performance/RedundantMerge`. This PR is corrected by adding a reproduction test.
8 tasks
koic
added a commit
to koic/rubocop-performance
that referenced
this issue
Jul 30, 2019
Follow up rubocop#68 (comment). rubocop#68 didn't solve an issue rubocop#67 with `Performance/RedundantMerge`. This PR is corrected by adding a reproduction test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
getting several of these errors:
That file is:
Could pretty obviously fix this instance, because that code is a bit strange, but there's also others. The line that is failing is the
server_opts.merge!
line.The text was updated successfully, but these errors were encountered: