-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
AllowPercentLiteralArrayArgument
option to `Lint/RedundantSplat…
…Expansion` Resolves standardrb/standard#223. This PR adds `AllowPercentLiteralArrayArgument` option to `Lint/RedundantSplatExpansion. I think it makes sense to allow the following splat usage. ```ruby expect(data).to include(*%w[ id type firstName lastName displayName photo phoneNumber publicPhone primaryMobile publicMobile publicEmail social primaryFacility facilities ]) ``` Therefore this PR defaults to `AllowPercentLiteralArrayArgument: true`. User can set `AllowPercentLiteralArrayArgument: false` if prefer RuboCop 1.6 or lower behavior.
- Loading branch information
Showing
4 changed files
with
120 additions
and
51 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...e_support_allow_percent_literal_array_argument_for_redundant_splat_expansion.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#9285](https://github.com/rubocop-hq/rubocop/pull/9285): Add `AllowPercentLiteralArrayArgument` option for `Lint/RedundantSplatExpansion` to enable the option by default. ([@koic][]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters