Skip to content

Commit

Permalink
Merge pull request #12215 from koic/update_the_doc_of_style_return_nil
Browse files Browse the repository at this point in the history
[Docs] Update the doc for `Style/ReturnNil`
  • Loading branch information
koic committed Sep 23, 2023
2 parents b242173 + eac9f3e commit 1e43822
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/rubocop/cop/style/return_nil.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
module RuboCop
module Cop
module Style
# Enforces consistency between 'return nil' and 'return'.
# Enforces consistency between `return nil` and `return`.
#
# Supported styles are: return, return_nil.
# This cop is disabled by default. Because there seems to be a perceived semantic difference
# between `return` and `return nil`. The former can be seen as just halting evaluation,
# while the latter might be used when the return value is of specific concern.
#
# Supported styles are `return` and `return_nil`.
#
# @example EnforcedStyle: return (default)
# # bad
Expand Down

0 comments on commit 1e43822

Please sign in to comment.