Skip to content

Commit

Permalink
Merge pull request #102 from rubocop/perform
Browse files Browse the repository at this point in the history
Enable cop for pending rubocop-performance
  • Loading branch information
pirj authored Feb 15, 2024
2 parents 4512513 + 1ff46d3 commit fe2b31d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,43 @@ Style/RedundantStringEscape:
Style/ReturnNilInPredicateMethodDefinition:
Enabled: true

# Enable pending rubocop-performance cops.

Performance/AncestorsInclude:
Enabled: true
Performance/BlockGivenWithExplicitBlock:
Enabled: true
Performance/CollectionLiteralInLoop:
Enabled: true
Performance/ConstantRegexp:
Enabled: true
Performance/MapCompact:
Enabled: true
Performance/MapMethodChain:
Enabled: true
Performance/MethodObjectAsBlock:
Enabled: true
Performance/RedundantEqualityComparisonBlock:
Enabled: true
Performance/RedundantSortBlock:
Enabled: true
Performance/RedundantSplitRegexpArgument:
Enabled: true
Performance/RedundantStringChars:
Enabled: true
Performance/ReverseFirst:
Enabled: true
Performance/SortReverse:
Enabled: true
Performance/Squeeze:
Enabled: true
Performance/StringIdentifierArgument:
Enabled: true
Performance/StringInclude:
Enabled: true
Performance/Sum:
Enabled: true

# Enable pending rubocop-rspec cops.

RSpec/BeEmpty:
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module SpecHelper
Dir
.glob(File.expand_path(spec_helper_glob, __dir__))
.sort
.each(&method(:require))
.each { |file| require file }

RSpec.configure do |config|
# Set metadata so smoke tests are run on all cop specs
Expand Down

0 comments on commit fe2b31d

Please sign in to comment.