Skip to content

Commit

Permalink
Performance/CollectionLiteralInLoop should be Enabled: 'pending'
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiculescu committed Oct 14, 2020
1 parent f355cf9 commit dc79333
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master (unreleased)

* [#181](https://github.com/rubocop-hq/rubocop-performance/pull/181): Change default configuration for `Performance/CollectionLiteralInLoop` to `Enabled: 'pending'`. ([@ghiculescu][])

### Changes

* [#170](https://github.com/rubocop-hq/rubocop-performance/pull/170): Extend `Performance/Sum` to register an offense for `map { ... }.sum`. ([@eugeneius][])
Expand Down
2 changes: 1 addition & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Performance/ChainArrayAllocation:

Performance/CollectionLiteralInLoop:
Description: 'Extract Array and Hash literals outside of loops into local variables or constants.'
Enabled: true
Enabled: 'pending'
VersionAdded: '1.8'
# Min number of elements to consider an offense
MinSize: 1
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/cops_performance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ array
|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged

| Enabled
| Pending
| Yes
| No
| 1.8
Expand Down

0 comments on commit dc79333

Please sign in to comment.