Skip to content

Commit

Permalink
Add VersionAdded to Style/HashTransformKeys, Style/HashTransformValues
Browse files Browse the repository at this point in the history
This PR added `VersionAdded` to `Style/HashTransformKeys` and `Style/HashTransformValue`.
This Cops was added at rubocop#7663 and published at 0.80.0.
  • Loading branch information
n0h0 committed Feb 25, 2020
1 parent f7adf6a commit 8fbe934
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config/default.yml
Expand Up @@ -2820,11 +2820,13 @@ Style/HashSyntax:
Style/HashTransformKeys:
Description: 'Prefer `transform_keys` over `each_with_object` and `map`.'
Enabled: 'pending'
VersionAdded: '0.80'
Safe: false

Style/HashTransformValues:
Description: 'Prefer `transform_values` over `each_with_object` and `map`.'
Enabled: 'pending'
VersionAdded: '0.80'
Safe: false

Style/IdenticalConditionalBranches:
Expand Down
4 changes: 2 additions & 2 deletions manual/cops_style.md
Expand Up @@ -2532,7 +2532,7 @@ PreferHashRocketsForNonAlnumEndingSymbols | `false` | Boolean
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
--- | --- | --- | --- | ---
Pending | No | Yes (Unsafe) | - | -
Pending | No | Yes (Unsafe) | 0.80 | -
This cop looks for uses of `_.each_with_object({}) {...}`,
`_.map {...}.to_h`, and `Hash[_.map {...}]` that are actually just
Expand Down Expand Up @@ -2562,7 +2562,7 @@ This cop should only be enabled on Ruby version 2.5 or newer
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
--- | --- | --- | --- | ---
Pending | No | Yes (Unsafe) | - | -
Pending | No | Yes (Unsafe) | 0.80 | -
This cop looks for uses of `_.each_with_object({}) {...}`,
`_.map {...}.to_h`, and `Hash[_.map {...}]` that are actually just
Expand Down

0 comments on commit 8fbe934

Please sign in to comment.