Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Calls with braces in interpolation for Style/MethodCallWithArgsParent…
…heses If we are calling methods in string interpolation with the `omit_parentheses` style for the `Style/MethodCallWithArgsParentheses` cop, they are currently forced to be without parentheses: ```ruby "#{part 1}, #{part 2}, #{part 3}" ``` My coworkers at Dext want to be able to put spaces while calling methods in interpolation, and I don't blame them. Having spaces reduces the noise of following a method call in a string, especially if the string happens to have multiple interpolations in it. I want to add the `AllowParenthesesInStringInterpolation` cop configuration that allows the use of parentheses in string interpolation calls. ```ruby "#{part(1)}, #{part(2)}, #{part(3)}" ```
- Loading branch information
1 parent
1b910ce
commit a34a957
Showing
5 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...es_in_string_interpolation_config_to_style_method_call_with_args_parentheses.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 @@ | ||
* [#9629](https://github.com/rubocop/rubocop/issues/9629): Add `AllowParenthesesInStringInterpolation` configuration to `Style/MethodCallWithArgsParentheses` to allow parenthesized calls in string interpolation. ([@gsamokovarov][]) |
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
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