Skip to content

Commit

Permalink
Enable rubocop-rails and enable new rubocop-performance cops
Browse files Browse the repository at this point in the history
  • Loading branch information
Raou1d committed Feb 5, 2021
1 parent a0e84a2 commit dd390e8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 43 deletions.
15 changes: 15 additions & 0 deletions .rubocop-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,18 @@ Performance/BindCall:

Performance/BigDecimalWithNumericArgument:
Enabled: true

Performance/BlockGivenWithExplicitBlock:
Enabled: true

Performance/CollectionLiteralInLoop:
Enabled: true

Performance/ConstantRegexp:
Enabled: true

Performance/MethodObjectAsBlock:
Enabled: true

Performance/Sum:
Enabled: true
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ require:
- rubocop-rspec

inherit_from:
- new_cops.yml
- default.yml

5 changes: 4 additions & 1 deletion default.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
inherit_from: .rubocop-performance.yml
inherit_from:
- .rubocop-performance.yml
- .rubocop-rails.yml
- new_cops.yml

AllCops:
TargetRubyVersion: 2.6
Expand Down
41 changes: 0 additions & 41 deletions new_cops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,6 @@ Style/RedundantSelfAssignment: # (new in 0.90)
Enabled: false
Style/SoleNestedConditional: # (new in 0.89)
Enabled: false
Rails/ActiveRecordCallbacksOrder: # (new in 2.7)
Enabled: false
Rails/FindById: # (new in 2.7)
Enabled: false
Rails/Inquiry: # (new in 2.7)
Enabled: false
Rails/MailerName: # (new in 2.7)
Enabled: false
Rails/MatchRoute: # (new in 2.7)
Enabled: false
Rails/NegateInclude: # (new in 2.7)
Enabled: false
Rails/Pluck: # (new in 2.7)
Enabled: false
Rails/PluckId: # (new in 2.7)
Enabled: false
Rails/PluckInWhere: # (new in 2.7)
Enabled: false
Rails/RenderInline: # (new in 2.7)
Enabled: false
Rails/RenderPlainText: # (new in 2.7)
Enabled: false
Rails/ShortI18n: # (new in 2.7)
Enabled: false
Rails/WhereExists: # (new in 2.7)
Enabled: false


Layout/BeginEndAlignment: # (new in 0.91)
Enabled: false
Expand All @@ -51,15 +24,13 @@ Lint/IdentityComparison: # (new in 0.91)
Lint/UselessTimes: # (new in 0.91)
Enabled: false


Lint/HashCompareByIdentity: # (new in 0.93)
Enabled: false
Lint/RedundantSafeNavigation: # (new in 0.93)
Enabled: false
Style/ClassEqualityComparison: # (new in 0.93)
Enabled: false


Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
Enabled: false
Lint/EmptyBlock: # (new in 1.1)
Expand All @@ -75,7 +46,6 @@ Style/DocumentDynamicEvalDefinition: # (new in 1.1)
Style/SwapValues: # (new in 1.1)
Enabled: false


Layout/SpaceBeforeBrackets: # (new in 1.7)
Enabled: false
Lint/AmbiguousAssignment: # (new in 1.7)
Expand Down Expand Up @@ -127,14 +97,3 @@ Rails/WhereEquals: # (new in 2.9)
Enabled: false
Rails/WhereNot: # (new in 2.8)
Enabled: false

Performance/BlockGivenWithExplicitBlock: # (new in 1.9)
Enabled: false
Performance/CollectionLiteralInLoop: # (new in 1.8)
Enabled: false
Performance/ConstantRegexp: # (new in 1.9)
Enabled: false
Performance/MethodObjectAsBlock: # (new in 1.9)
Enabled: false
Performance/Sum: # (new in 1.8)
Enabled: false

0 comments on commit dd390e8

Please sign in to comment.