-
Notifications
You must be signed in to change notification settings - Fork 275
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
Various lints #80
Merged
Merged
Various lints #80
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
3db4b95
Merge remote-tracking branch 'remotes/origin/master' into develop
liamsi 82f68e6
Merge branch 'develop' of https://github.com/tendermint/iavl into dev…
liamsi c4e403b
Merge branch 'develop' of https://github.com/tendermint/iavl into dev…
liamsi 4ed3e87
Release/v0.9.1 (#79)
liamsi 85260b4
Merge branch 'develop' of https://github.com/tendermint/iavl into dev…
liamsi 984c7d7
Merge remote-tracking branch 'remotes/origin/master' into develop
liamsi 9f49e86
appease the linters
liamsi 74c0d02
unexport helper function & godoc compatibility
liamsi 645c77c
remove unused exported method
liamsi 66ff584
comment exported method and unexport debug helper method
liamsi b4076e4
remove unnused private methods
liamsi 1af65a6
remove obsolete else blocks (golint):
liamsi c551088
remove more obsolete else blocks (golint) and more lints
liamsi e1d4252
update comment and remove non-trivial obsolete else block (more lints)
liamsi 50a5c52
remove last obsolete else block (more lints)
liamsi 9544424
more idiomatic golang code:
liamsi 84d8eac
remove unused named returns
liamsi e0c8fa1
review comments (thanks @melekes)
liamsi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
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.
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'd advocate that sometimes
if then else
does make perfect sense and this is one of those casesNOT
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 kinda agree. It makes more sense here then in many other places. I think the point is that there is a return in the first case (which makes the else obsolete semantically). Can reintroduce if you think that is important.
I would rather suggest to refactor this such that the return statement(s) is(/are) outside of the if-then-else. Something I really like about (idiomatic) go is that code usually looks very similar. For me an
if left { // ...} else { //right }
would look like there are no return statements to expect there. What do you think?