Preparing report...

Report for github.com/pdupub/go-pdu

A+    Excellent!    Found 12 issues across 39 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!


gocyclo92%

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.


golint69%

Golint is a linter for Go source code.

    • go-pdu/p2p/bootnode.go
    • Line 45: warning: exported const BucketMsg should have comment or be unexported (golint)
    • Line 46: warning: exported const UploadFileSizeLimit should have comment or be unexported (golint)
    • Line 47: warning: exported const PrefixMessage should have comment or be unexported (golint)
    • Line 48: warning: exported const PrefixIndividual should have comment or be unexported (golint)
    • Line 49: warning: exported const PrefixLast should have comment or be unexported (golint)
    • Line 50: warning: exported const PrefixCount should have comment or be unexported (golint)
    • Line 51: warning: exported const PrefixSystem should have comment or be unexported (golint)
    • Line 53: warning: exported type UploadResponse should have comment or be unexported (golint)
    • Line 59: warning: exported type BootNode should have comment or be unexported (golint)
    • Line 72: warning: exported function NewBootNode should have comment or be unexported (golint)
    • Line 94: warning: exported method BootNode.AddPeers should have comment or be unexported (golint)
    • Line 152: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 312: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • go-pdu/params/config.go
    • Line 26: warning: exported const DefaultPort should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported function TestKeystore should have comment or be unexported (golint)
    • Line 39: warning: exported function TestAddrs should have comment or be unexported (golint)
    • go-pdu/contracts/operator.go
    • Line 41: warning: exported type PosterRecord should have comment or be unexported (golint)
    • Line 51: warning: exported type Operator should have comment or be unexported (golint)
    • Line 59: warning: exported function NewOperator should have comment or be unexported (golint)
    • Line 104: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 110: warning: exported method Operator.SetKey should have comment or be unexported (golint)
    • Line 114: warning: exported method Operator.GetNextRecordID should have comment or be unexported (golint)
    • Line 118: warning: exported method Operator.GetLastRecords should have comment or be unexported (golint)
    • go-pdu/core/matrix.go
    • Line 25: warning: exported type Matrix should have comment or be unexported (golint)
    • Line 30: warning: exported function NewMatrix should have comment or be unexported (golint)
    • Line 34: warning: exported method Matrix.SetSociety should have comment or be unexported (golint)
    • Line 38: warning: exported method Matrix.GetSociety should have comment or be unexported (golint)
    • Line 42: warning: exported method Matrix.SetEntropy should have comment or be unexported (golint)
    • Line 46: warning: exported method Matrix.GetEntropy should have comment or be unexported (golint)
    • Line 50: warning: exported method Matrix.ReceiveMsg should have comment or be unexported (golint)
    • go-pdu/core/settings.go
    • Line 22: warning: exported const FamilyTraceLevel should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: comment on exported var GenesisRoots should be of the form "GenesisRoots ..." (golint)
    • Line 37: warning: exported var DefaultGLimit should have comment or be unexported (golint)
    • go-pdu/identity/utils.go
    • Line 59: warning: exported function InspectKeystore should have comment or be unexported (golint)
    • Line 168: warning: exported function UnlockKeystoreArray should have comment or be unexported (golint)
    • go-pdu/core/genesis.go
    • Line 28: warning: exported type GGInfo should have comment or be unexported (golint)
    • Line 34: warning: exported function NewGGInfo should have comment or be unexported (golint)
    • Line 38: warning: exported type Genesis should have comment or be unexported (golint)
    • Line 43: warning: exported method Genesis.SetUniverse should have comment or be unexported (golint)
    • Line 47: warning: exported method Genesis.GetUniverse should have comment or be unexported (golint)
    • Line 51: warning: exported method Genesis.GetMsgs should have comment or be unexported (golint)
    • Line 65: warning: exported function CreateGenesis should have comment or be unexported (golint)
    • Line 146: warning: exported function LoadGenesis should have comment or be unexported (golint)
    • go-pdu/core/universe.go
    • Line 19: warning: exported type Universe should have comment or be unexported (golint)
    • Line 23: warning: exported function NewUniverse should have comment or be unexported (golint)
    • go-pdu/identity/identity.go
    • Line 29: warning: exported type DID should have comment or be unexported (golint)
    • Line 33: warning: exported function New should have comment or be unexported (golint)
    • Line 52: warning: exported method DID.GetKey should have comment or be unexported (golint)
    • Line 56: warning: exported method DID.Inspect should have comment or be unexported (golint)
    • Line 65: warning: exported method DID.LoadECDSA should have comment or be unexported (golint)
    • go-pdu/cmd/pdu/main.go
    • Line 129: warning: exported function TestCmd should have comment or be unexported (golint)
    • Line 481: warning: exported function InitUniverseCmd should have comment or be unexported (golint)
    • Line 569: warning: exported function CreateKeystoreCmd should have comment or be unexported (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!