-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add linter Nakedret #5068
Merged
Merged
Add linter Nakedret #5068
Conversation
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
- added linter Nakedret Followed this: ``` Naked returns are okay if the function is a handful of lines. Once it's a medium sized function, be explicit with your return values. Corollary: it's not worth it to name result parameters just because it enables you to use naked returns. Clarity of docs is always more important than saving a line or two in your function. ``` But didnt remove named result params as i know people are in favor of it Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
Codecov Report
@@ Coverage Diff @@
## master #5068 +/- ##
==========================================
+ Coverage 55.03% 55.03% +<.01%
==========================================
Files 291 291
Lines 17838 17841 +3
==========================================
+ Hits 9817 9819 +2
- Misses 7314 7315 +1
Partials 707 707 |
1522afa
to
ae833c0
Compare
ae833c0
to
d8f7000
Compare
tac0turtle
commented
Sep 19, 2019
Love this and I've always advocated for this. Thanks @marbar3778 |
alexanderbez
approved these changes
Sep 19, 2019
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.
ACK + fixed PrintOutput
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Type: Code Hygiene
General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Followed this:
But didnt remove named result params as i know people are in favor of it
ref #4589
Signed-off-by: Marko Baricevic marbar3778@yahoo.com
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry to the
Unreleased
section inCHANGELOG.md
Re-reviewed
Files changed
in the github PR explorerFor Admin Use: