-
Notifications
You must be signed in to change notification settings - Fork 144
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
Fix golint warnings #422
Fix golint warnings #422
Conversation
golint now requires all exported types, methods, and constants to have documentation comments on them. And the comments should have a particular style, starting with the identifier they describe.
These constants should not be exported, they are for internal use. Spell them with a lowercase initial letter instead of uppercase.
Go code style requires to use camelCase for variables, not snake_case.
golint warns us about incorrect spelling, fix it where possible. Don't rename GetRemoteId and GetPublicKeyForId methods to avoid breaking backward compatibility.
Values are zero-initialized by default, golint warns about explicit zero initialization. Remove it.
There are more Go files which may trigger golint spellchecker. Fix identified casing there as well.
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.
All good except backwards compatibility break for SecureMessage, plz remove it from current PR
Also: shall update all code in Wiki examples to use new syntax |
The constants in Since we did not expose this API in 0.10, I think we're okay with renaming the constants directly right now: the users will not see them in 0.11 so this should not break existing code. |
oh, if they are not exposed to the end users – I'm quite happy then :) |
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.
lgtm
I've installed the latest golint and walked through the warnings. This should improve out future Go Report, but I'm not sure that we'll get 90%+ score. There are still some warnings that we can't fix without breaking backwards compatibility by renaming constants, structures and methods:
golint now requires all exported types, methods, and constants to have documentation comments on them. And the comments should have a particular style, starting with the identifier they describe. I've added some basic comments for all structs and methods.
Secure Message mode constants should not be exported, they are for internal use. Spell them with a lowercase initial letter instead of uppercase.
Go code style requires to use camelCase for variables, not snake_case.
golint warns us about incorrect spelling, fix it where possible.
Values are zero-initialized by default, golint warns about explicit zero initialization. Remove it in Secure Cell code.