Preparing report...

Report for github.com/hlandau/passlib

A    Great!    Found 19 issues across 23 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo95%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.


golint17%

Golint is a linter for Go source code.

    • passlib/hash/sha2crypt/raw/sha2crypt.go
    • Line 10: warning: comment on exported const MinimumRounds should be of the form "MinimumRounds ..." (golint)
    • Line 13: warning: comment on exported const MaximumRounds should be of the form "MaximumRounds ..." (golint)
    • Line 17: warning: comment on exported const DefaultRounds should be of the form "DefaultRounds ..." (golint)
    • Line 22: warning: comment on exported const RecommendedRounds should be of the form "RecommendedRounds ..." (golint)
    • Line 28: warning: comment on exported function Crypt256 should be of the form "Crypt256 ..." (golint)
    • Line 44: warning: comment on exported function Crypt512 should be of the form "Crypt512 ..." (golint)
    • passlib/hash/bcryptsha256/bcryptsha256.go
    • Line 19: warning: comment on exported var Crypter should be of the form "Crypter ..." (golint)
    • Line 24: warning: comment on exported const RecommendedCost should be of the form "RecommendedCost ..." (golint)
    • Line 31: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 83: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • passlib/hash/scrypt/scrypt.go
    • Line 16: warning: comment on exported var SHA256Crypter should be of the form "SHA256Crypter ..." (golint)
    • Line 29: warning: comment on exported function NewSHA256 should be of the form "NewSHA256 ..." (golint)
    • passlib/hash/pbkdf2/pbkdf2.go
    • Line 19: warning: comment on exported var SHA1Crypter should be of the form "SHA1Crypter ..." (golint)
    • Line 28: warning: exported var SHA256Crypter should have comment or be unexported (golint)
    • Line 29: warning: exported var SHA512Crypter should have comment or be unexported (golint)
    • Line 32: warning: exported const RecommendedRoundsSHA1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported const SaltLength should have comment or be unexported (golint)
    • Line 51: warning: exported function New should have comment or be unexported (golint)
    • passlib/hash/pbkdf2/pbkdf2_test.go
    • Line 10: warning: don't use underscores in Go names; var test_sha1 should be testSha1 (golint)
    • Line 34: warning: don't use underscores in Go names; var test_sha256 should be testSha256 (golint)
    • Line 58: warning: don't use underscores in Go names; var test_sha512 should be testSha512 (golint)
    • Line 84: warning: don't use underscores in Go names; var test_hashes should be testHashes (golint)
    • Line 131: warning: don't use underscores in Go names; var test_hashes should be testHashes (golint)
    • Line 178: warning: don't use underscores in Go names; var test_hashes should be testHashes (golint)
    • passlib/passlib.go
    • Line 30: warning: comment on exported type Context should be of the form "Context ..." (with optional leading article) (golint)
    • Line 51: warning: comment on exported method Context.Hash should be of the form "Hash ..." (golint)
    • Line 67: warning: comment on exported method Context.Verify should be of the form "Verify ..." (golint)
    • Line 82: warning: comment on exported method Context.VerifyNoUpgrade should be of the form "VerifyNoUpgrade ..." (golint)
    • Line 123: warning: comment on exported method Context.NeedsUpdate should be of the form "NeedsUpdate ..." (golint)
    • Line 135: warning: comment on exported var DefaultContext should be of the form "DefaultContext ..." (golint)
    • Line 141: warning: comment on exported function Hash should be of the form "Hash ..." (golint)
    • Line 148: warning: comment on exported function Verify should be of the form "Verify ..." (golint)
    • Line 163: warning: comment on exported function VerifyNoUpgrade should be of the form "VerifyNoUpgrade ..." (golint)
    • Line 168: warning: comment on exported function NeedsUpdate should be of the form "NeedsUpdate ..." (golint)
    • passlib/hash/bcrypt/bcrypt.go
    • Line 12: warning: comment on exported var Crypter should be of the form "Crypter ..." (golint)
    • Line 17: warning: comment on exported const RecommendedCost should be of the form "RecommendedCost ..." (golint)
    • Line 26: warning: comment on exported function New should be of the form "New ..." (golint)
    • passlib/hash/scrypt/raw/scrypt.go
    • Line 10: warning: comment on exported const RecommendedN should be of the form "RecommendedN ..." (golint)
    • Line 13: warning: comment on exported const Recommendedr should be of the form "Recommendedr ..." (golint)
    • Line 16: warning: comment on exported const Recommendedp should be of the form "Recommendedp ..." (golint)
    • Line 19: warning: comment on exported function ScryptSHA256 should be of the form "ScryptSHA256 ..." (golint)
    • Line 42: warning: comment on exported var ErrInvalidStub should be of the form "ErrInvalidStub ..." (golint)
    • Line 45: warning: comment on exported function Parse should be of the form "Parse ..." (golint)
    • passlib/hash/sha2crypt/sha2crypt.go
    • Line 13: warning: comment on exported var Crypter256 should be of the form "Crypter256 ..." (golint)
    • Line 18: warning: comment on exported var Crypter512 should be of the form "Crypter512 ..." (golint)
    • Line 28: warning: comment on exported function NewCrypter256 should be of the form "NewCrypter256 ..." (golint)
    • Line 34: warning: comment on exported function NewCrypter512 should be of the form "NewCrypter512 ..." (golint)
    • Line 142: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • passlib/hash/argon2/argon2.go
    • Line 16: warning: comment on exported var Crypter should be of the form "Crypter ..." (golint)
    • Line 31: warning: comment on exported function New should be of the form "New ..." (golint)
    • passlib/hash/sha2crypt/raw/parse.go
    • Line 7: warning: comment on exported var ErrInvalidStub should be of the form "ErrInvalidStub ..." (golint)
    • Line 10: warning: comment on exported var ErrInvalidRounds should be of the form "ErrInvalidRounds ..." (golint)
    • Line 13: warning: comment on exported function Parse should be of the form "Parse ..." (golint)
    • passlib/abstract/errors.go
    • Line 7: warning: comment on exported var ErrInvalidPassword should be of the form "ErrInvalidPassword ..." (golint)
    • Line 11: warning: comment on exported var ErrUnsupportedScheme should be of the form "ErrUnsupportedScheme ..." (golint)
    • passlib/hash/pbkdf2/raw/parse.go
    • Line 13: warning: comment on exported var ErrInvalidStub should be of the form "ErrInvalidStub ..." (golint)
    • Line 16: warning: comment on exported var ErrInvalidRounds should be of the form "ErrInvalidRounds ..." (golint)
    • Line 25: warning: exported function Parse should have comment or be unexported (golint)
    • passlib/hash/argon2/raw/argon2.go
    • Line 12: warning: comment on exported const RecommendedTime should be of the form "RecommendedTime ..." (golint)
    • Line 15: warning: comment on exported const RecommendedMemory should be of the form "RecommendedMemory ..." (golint)
    • Line 18: warning: comment on exported const RecommendedThreads should be of the form "RecommendedThreads ..." (golint)
    • Line 21: warning: comment on exported function Argon2 should be of the form "Argon2 ..." (golint)
    • Line 41: warning: comment on exported var ErrInvalidStub should be of the form "ErrInvalidStub ..." (golint)
    • Line 44: warning: comment on exported var ErrInvalidKeyValuePair should be of the form "ErrInvalidKeyValuePair ..." (golint)
    • Line 47: warning: comment on exported var ErrParseVersion should be of the form "ErrParseVersion ..." (golint)
    • Line 50: warning: comment on exported var ErrParseConfig should be of the form "ErrParseConfig ..." (golint)
    • Line 53: warning: comment on exported var ErrMissingVersion should be of the form "ErrMissingVersion ..." (golint)
    • Line 57: warning: comment on exported var ErrMissingMemory should be of the form "ErrMissingMemory ..." (golint)
    • Line 61: warning: comment on exported var ErrMissingTime should be of the form "ErrMissingTime ..." (golint)
    • Line 65: warning: comment on exported var ErrMissingParallelism should be of the form "ErrMissingParallelism ..." (golint)
    • Line 69: warning: comment on exported function Parse should be of the form "Parse ..." (golint)
    • passlib/hash/pbkdf2/raw/pbkdf2.go
    • Line 9: warning: exported const MinRounds should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported function Hash should have comment or be unexported (golint)
    • passlib/default.go
    • Line 15: warning: comment on exported const Defaults20160922 should be of the form "Defaults20160922 ..." (golint)
    • Line 19: warning: comment on exported const Defaults20180601 should be of the form "Defaults20180601 ..." (golint)
    • Line 23: warning: comment on exported const DefaultsLatest should be of the form "DefaultsLatest ..." (golint)
    • Line 55: warning: comment on exported var DefaultSchemes should be of the form "DefaultSchemes ..." (golint)
    • Line 76: warning: comment on exported function UseDefaults should be of the form "UseDefaults ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell91%

Misspell Finds commonly misspelled English words