Skip to content

Commit

Permalink
Document cases where parens are accepted even in omit_parentheses s…
Browse files Browse the repository at this point in the history
…tyle
  • Loading branch information
gsamokovarov authored and bbatsov committed Mar 22, 2021
1 parent cfc5d81 commit 0ec3ee3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/rubocop/cop/style/method_call_with_args_parentheses.rb
Expand Up @@ -79,6 +79,30 @@ module Style
# # good
# foo.enforce strict: true
#
# # good
# # Allows parens for calls that won't produce valid Ruby or be ambiguous.
# model.validate strict(true)
#
# # good
# # Allows parens for calls that won't produce valid Ruby or be ambiguous.
# yield path, File.basename(path)
#
# # good
# # Operators methods calls with parens
# array&.[](index)
#
# # good
# # Operators methods without parens, if you prefer
# array.[] index
#
# # good
# # Operators methods calls with parens
# array&.[](index)
#
# # good
# # Operators methods without parens, if you prefer
# array.[] index
#
# @example IgnoreMacros: true (default)
#
# # good
Expand Down

0 comments on commit 0ec3ee3

Please sign in to comment.