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:
parent
fe71a56a56
commit
76b199e438
6 changed files with 14 additions and 4 deletions
10
.rubocop.yml
10
.rubocop.yml
|
|
@ -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
|
||||
|
|
|
|||
2
Gemfile
2
Gemfile
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
BIN
vendor/cache/rubocop-performance-1.10.1.gem
vendored
Normal file
BIN
vendor/cache/rubocop-performance-1.10.1.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/rubocop-performance-1.9.2.gem
vendored
BIN
vendor/cache/rubocop-performance-1.9.2.gem
vendored
Binary file not shown.
Loading…
Add table
Reference in a new issue