Preparing report...

Report for github.com/easonlin404/ksm

A+    Excellent!    Found 10 issues across 18 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!


gocyclo94%

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.

    • ksm/ksm.go
    • Line 334: warning: cyclomatic complexity 21 of function parseTLLVs() is high (> 15) (gocyclo)

golint50%

Golint is a linter for Go source code.

    • ksm/crypto/aes/aes.go
    • Line 9: warning: exported function Encrypt should have comment or be unexported (golint)
    • Line 21: warning: exported function Decrypt should have comment or be unexported (golint)
    • Line 33: warning: exported function PKCS5Padding should have comment or be unexported (golint)
    • Line 39: warning: exported function PKCS5UnPadding should have comment or be unexported (golint)
    • ksm/crypto/rsa/reader.go
    • Line 7: warning: exported type Reader should have comment or be unexported (golint)
    • Line 16: warning: exported type FileReader should have comment or be unexported (golint)
    • Line 20: warning: exported method FileReader.ReadPem should have comment or be unexported (golint)
    • Line 29: warning: exported type TextReader should have comment or be unexported (golint)
    • Line 33: warning: exported method TextReader.ReadPem should have comment or be unexported (golint)
    • ksm/crypto/rsa/rsa.go
    • Line 36: warning: exported function EncryptByCert should have comment or be unexported (golint)
    • Line 51: warning: exported function Decrypt should have comment or be unexported (golint)
    • ksm/example/basic.go
    • Line 64: warning: comment on exported type RandomContentKey should be of the form "RandomContentKey ..." (with optional leading article) (golint)
    • Line 68: warning: comment on exported method RandomContentKey.FetchContentKey should be of the form "FetchContentKey ..." (golint)
    • Line 77: warning: comment on exported method RandomContentKey.FetchContentKeyDuration should be of the form "FetchContentKeyDuration ..." (golint)
    • ksm/d/d.go
    • Line 8: warning: comment on exported type D should be of the form "D ..." (with optional leading article) (golint)
    • Line 18: warning: exported type AppleD should have comment or be unexported (golint)
    • Line 21: warning: exported method AppleD.Compute should have comment or be unexported (golint)
    • ksm/d/d_function.go
    • Line 10: warning: exported const PRIME should have comment or be unexported (golint)
    • Line 11: warning: exported const NB_RD should have comment or be unexported (golint)
    • Line 13: warning: don't use underscores in Go names; type CP_D_Function should be CPDFunction (golint)
    • Line 13: warning: exported type CP_D_Function should have comment or be unexported (golint)
    • Line 16: warning: exported method CP_D_Function.Compute should have comment or be unexported (golint)
    • Line 34: warning: exported method CP_D_Function.ComputeHashValue should have comment or be unexported (golint)
    • Line 45: warning: don't use underscores in Go names; var R2_sz should be R2Sz (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!