Bump rubocop-performance from 1.9.2 to 1.10.1 (#12860)

* Bump rubocop-performance from 1.9.2 to 1.10.1

Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.9.2 to 1.10.1.
- [Release notes](https://github.com/rubocop/rubocop-performance/releases)
- [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.9.2...v1.10.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Enable new cops

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: rhymes <rhymes@hey.com>
This commit is contained in:
dependabot[bot] 2021-03-02 10:37:13 +01:00 committed by GitHub
parent fe71a56a56
commit 76b199e438
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 4 deletions

View file

@ -686,6 +686,12 @@ Performance/IoReadlines:
Reference: 'https://docs.gitlab.com/ee/development/performance.html#reading-from-files-and-other-data-sources'
Enabled: true
Performance/RedundantEqualityComparisonBlock:
Description: >-
Checks for uses `Enumerable#all?`, `Enumerable#any?`, `Enumerable#one?`,
or `Enumerable#none?` are compared with `===` or similar methods in block.
Enabled: true
Performance/OpenStruct:
Description: 'Use `Struct` instead of `OpenStruct`.'
Enabled: true
@ -694,6 +700,10 @@ Performance/RedundantSortBlock:
Description: 'Use `sort` instead of `sort { |a, b| a <=> b }`.'
Enabled: true
Performance/RedundantSplitRegexpArgument:
Description: 'This cop identifies places where `split` argument can be replaced from a deterministic regexp to a string.'
Enabled: true
Performance/RedundantStringChars:
Description: 'Checks for redundant `String#chars`.'
Enabled: true

View file

@ -148,7 +148,7 @@ group :development, :test do
gem "pry-byebug", "~> 3.8" # Combine 'pry' with 'byebug'. Adds 'step', 'next', 'finish', 'continue' and 'break' commands to control execution
gem "rspec-rails", "~> 4.0" # rspec-rails is a testing framework for Rails 3+
gem "rubocop", "~> 1.11", require: false # Automatic Ruby code style checking tool
gem "rubocop-performance", "~> 1.9", require: false # A collection of RuboCop cops to check for performance optimizations in Ruby code
gem "rubocop-performance", "~> 1.10", require: false # A collection of RuboCop cops to check for performance optimizations in Ruby code
gem "rubocop-rails", "~> 2.9", require: false # Automatic Rails code style checking tool
gem "rubocop-rspec", "~> 2.2", require: false # Code style checking for RSpec files
gem "sassc-rails", "~> 2.1.2" # Integrate SassC-Ruby into Rails

View file

@ -672,7 +672,7 @@ GEM
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.1)
parser (>= 2.7.1.5)
rubocop-performance (1.9.2)
rubocop-performance (1.10.1)
rubocop (>= 0.90.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.9.1)
@ -963,7 +963,7 @@ DEPENDENCIES
rspec-rails (~> 4.0)
rspec-retry (~> 0.6)
rubocop (~> 1.11)
rubocop-performance (~> 1.9)
rubocop-performance (~> 1.10)
rubocop-rails (~> 2.9)
rubocop-rspec (~> 2.2)
ruby-prof (~> 1.4)

View file

@ -19,7 +19,7 @@ module CommentsHelper
[
commentable.user_id,
commentable.co_author_ids,
].flatten.any? { |id| id == comment.user_id }
].flatten.any?(comment.user_id)
end
def get_ama_or_op_banner(commentable)

Binary file not shown.

Binary file not shown.