-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Revive fixes - part 2 #8835
Revive fixes - part 2 #8835
Conversation
[rule.if-return] [rule.increment-decrement] [rule.var-declaration] [rule.package-comments] [rule.receiver-naming] [rule.unexported-return]
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.
🤝 ✅ CLA has been signed. Thank you!
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.
Looks good, found only very minor things... ;-)
Regarding the renaming of the "class" variable I'm not so sure about the exceptions, but if everybody can live with it...
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.
Looks good to me.
For retry |
For retry of windows tests |
I think there's still a lot of var struct/map/slice cases left over. I'm guessing we don't want to use |
@ssoroka All var struct/map/slice cases reverted. |
* Revive fixes regarding following set of rules: [rule.if-return] [rule.increment-decrement] [rule.var-declaration] [rule.package-comments] [rule.receiver-naming] [rule.unexported-return]
Revive is fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
This is part2 of fixes for problems found for following set of rules:
i++
andi--
instead ofi += 1
andi -= 1
. -> By convention, for better readability, incrementing an integer variable by 1 is recommended to be done using the++
operator. This rule spots expressions likei += 1
andi -= 1
and proposes to change them intoi++
andi--
.package
keyword. More information hereParts
,p
is an adequate name for it. Contrary to other languages, it is not idiomatic to name receivers asthis
orself
.For changed files, minor fixes were also made (got rid off "log" package where it was easy, CamelCase instead of snake_case, etc...)