forked from rubocop/rubocop
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…and return` Resolves rubocop#7795. This PR makes `Layout/EmptyLineAfterGuardClause` aware of `and return`. It was proposed based on the following code controlled by Rails controller. ```ruby render :foo and return if condition do_something ``` I think that it can be generalized as a control flow. ```ruby foo(arg) and return if condition do_something ``` So it will be newly detected by `Layout/EmptyLineAfterGuardClause` cop.
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
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