Skip to content
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

Continue fixing golint errors [T708] #221

Merged
merged 8 commits into from
Jul 26, 2018
Merged

Conversation

vixentael
Copy link
Collaborator

Fixes include:

  • added package headers here and there.
  • added many comments to public functions/ types.
  • fixed "if block ends with a return statement, so drop this else and outdent its block".
  • changed "n += 1" to "n++".
  • fixed naming for some fields (serverId -> serverID).

Errors number decreased from 788 to 512.

@@ -83,7 +91,7 @@ func (hp HashedPasswords) SetPassword(name, password string) (err error) {
return nil
}

func ParseHtpasswdFile(file string, keystore *filesystem.FilesystemKeyStore) (passwords HashedPasswords, err error) {
func parseHtpasswdFile(file string, keystore *filesystem.FilesystemKeyStore) (passwords HashedPasswords, err error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to private because used only in this module?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

const (
TEST_MODE = "true"
)

var TestOnly = "false"
var testOnly = "false"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this variable used on compile time to set test mode - https://github.com/cossacklabs/acra/blob/master/tests/test.py#L292
is it work after renaming and changing to private?

@@ -8,7 +8,7 @@ import (
type TestCallback struct{ CallCount *int }

func (callback *TestCallback) Call() error {
*callback.CallCount += 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python style vs golang style))

Copy link
Collaborator

@Lagovas Lagovas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check and update variable name of main.TestOnly in tests/test.py

@vixentael
Copy link
Collaborator Author

check and update variable name of main.TestOnly in tests/test.py

that's might be the reason of failing tests. thank you

@Lagovas
Copy link
Collaborator

Lagovas commented Jul 26, 2018

awesome results) well done :)

@vixentael vixentael merged commit 919e571 into master Jul 26, 2018
@vixentael vixentael deleted the vixentael/more-golint branch July 26, 2018 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants