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 7d88f75
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Changes

* [#181](https://github.com/rubocop-hq/rubocop-performance/pull/181): Change default configuration for `Performance/CollectionLiteralInLoop` to `Enabled: 'pending'`. ([@ghiculescu][])
* [#170](https://github.com/rubocop-hq/rubocop-performance/pull/170): Extend `Performance/Sum` to register an offense for `map { ... }.sum`. ([@eugeneius][])
* [#179](https://github.com/rubocop-hq/rubocop-performance/pull/179): Change `Performance/Sum` to warn about empty arrays, and not register an offense on empty array literals. ([@ghiculescu][])
* [#180](https://github.com/rubocop-hq/rubocop-performance/pull/180): Require RuboCop 0.90 or higher. ([@koic][])
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 7d88f75

Please sign in to comment.