-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CS] Avoid using useless expressions #6701
Conversation
👍 |
@@ -175,6 +175,9 @@ Structure | |||
switched to opt-in via ``@`` operator. | |||
Read more at :ref:`contributing-code-conventions-deprecations`. | |||
|
|||
* Do not use ``else``, ``elseif``, ``break`` after ``if`` and ``case`` conditions | |||
which returns or throws something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, but should we say ... which return or throw something
instead of ... which returnS or throwS something
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree @javiereguiluz since we are talking about them plural, and not separately. I'll update this ASAP. Thank you.
👍 |
| Q | A | ------------- | --- | Doc fix? | yes | New docs? | yes | Applies to | all | Fixed tickets | N/A Do not use `else`, `elseif`, `break` after `if` and `case` conditions which return or throw something.
6a64cd5
to
d96faa4
Compare
Thanks Javier! |
This PR was merged into the 2.7 branch. Discussion ---------- [CS] Avoid using useless expressions | Q | A | ------------- | --- | Doc fix? | yes | New docs? | yes | Applies to | all | Fixed tickets | N/A Do not use `else`, `elseif`, `break` after `if` and `case` conditions which returns or throws something. Commits ------- d96faa4 Avoid using useless expressions
Do not use
else
,elseif
,break
afterif
andcase
conditionswhich returns or throws something.