Preparing report...

Report for github.com/trustbloc/fabric-peer-ext

A+    Excellent!    Found 29 issues across 413 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!


gocyclo100%

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.

No problems detected. Good job!


golint95%

Golint is a linter for Go source code.

    • fabric-peer-ext/mod/peer/ledger/kvledger/reset.go
    • Line 30: warning: exported function ClearPreResetHeight should have comment or be unexported (golint)
    • Line 39: warning: exported function ResetAllKVLedgers should have comment or be unexported (golint)
    • Line 60: warning: exported function ResetBlockStore should have comment or be unexported (golint)
    • fabric-peer-ext/pkg/pvtdatastorage/common/store.go
    • Line 36: warning: exported type DataEntry should have comment or be unexported (golint)
    • Line 41: warning: exported type ExpiryEntry should have comment or be unexported (golint)
    • Line 46: warning: exported type ExpiryKey should have comment or be unexported (golint)
    • Line 51: warning: exported type NsCollBlk should have comment or be unexported (golint)
    • Line 56: warning: exported type DataKey should have comment or be unexported (golint)
    • Line 61: warning: exported type MissingDataKey should have comment or be unexported (golint)
    • Line 65: warning: exported type StoreEntries should have comment or be unexported (golint)
    • Line 92: warning: exported type DataAndExpiryEntries should have comment or be unexported (golint)
    • Line 189: warning: exported type ExpiryData should have comment or be unexported (golint)
    • Line 191: warning: exported function NewExpiryData should have comment or be unexported (golint)
    • Line 216: warning: exported method ExpiryData.AddPresentData should have comment or be unexported (golint)
    • Line 227: warning: exported method ExpiryData.AddMissingData should have comment or be unexported (golint)
    • Line 232: warning: exported method ExpiryData.Reset should have comment or be unexported (golint)
    • Line 239: warning: exported method ExpiryData.ProtoMessage should have comment or be unexported (golint)
    • Line 242: warning: exported function ConstructDataEntriesFromBlocksPvtData should have comment or be unexported (golint)
    • Line 252: warning: exported function GetLastUpdatedOldBlocksList should have comment or be unexported (golint)
    • Line 278: warning: exported function ResetLastUpdatedOldBlocksList should have comment or be unexported (golint)
    • Line 287: warning: comment on exported function GetMissingPvtDataInfoForMostRecentBlocks should be of the form "GetMissingPvtDataInfoForMostRecentBlocks ..." (golint)
    • Line 367: warning: comment on exported function ProcessCollsEligibilityEnabled should be of the form "ProcessCollsEligibilityEnabled ..." (golint)
    • Line 386: warning: exported type OldBlockDataProcessor should have comment or be unexported (golint)
    • Line 393: warning: exported function NewOldBlockDataProcessor should have comment or be unexported (golint)
    • Line 406: warning: exported method OldBlockDataProcessor.PrepareDataAndExpiryEntries should have comment or be unexported (golint)
    • Line 447: warning: exported method OldBlockDataProcessor.PrepareMissingDataEntriesToReflectReconciledData should have comment or be unexported (golint)
    • Line 473: warning: exported method OldBlockDataProcessor.PrepareMissingDataEntriesToReflectPriority should have comment or be unexported (golint)
    • Line 515: warning: exported method OldBlockDataProcessor.ConstructDBUpdateBatch should have comment or be unexported (golint)
    • fabric-peer-ext/test/cc/hellocc/hellocc.go
    • Line 37: warning: exported const HelloDataType should have comment (or a comment on this block) or be unexported (golint)
    • Line 119: warning: receiver name h should be consistent with previous receiver name cc for HelloCC (golint)
    • Line 193: warning: receiver name h should be consistent with previous receiver name cc for HelloCC (golint)
    • Line 205: warning: receiver name h should be consistent with previous receiver name cc for HelloCC (golint)
    • Line 235: warning: receiver name h should be consistent with previous receiver name cc for HelloCC (golint)
    • fabric-peer-ext/pkg/pvtdatastorage/common/collelgproc.go
    • Line 22: warning: exported type CollElgProcSync should have comment or be unexported (golint)
    • Line 30: warning: exported function NewCollElgProcSync should have comment or be unexported (golint)
    • Line 61: warning: exported method CollElgProcSync.WaitForDone should have comment or be unexported (golint)
    • Line 65: warning: exported method CollElgProcSync.LaunchCollElgProc should have comment or be unexported (golint)
    • fabric-peer-ext/pkg/pvtdatastorage/common/kv_encoding.go
    • Line 26: warning: exported var PendingCommitKey should have comment or be unexported (golint)
    • Line 38: warning: exported function EncodeDataKey should have comment or be unexported (golint)
    • Line 45: warning: exported function EncodeDataValue should have comment or be unexported (golint)
    • Line 49: warning: exported function EncodeExpiryKey should have comment or be unexported (golint)
    • Line 54: warning: exported function DecodeExpiryKey should have comment or be unexported (golint)
    • Line 62: warning: exported function EncodeExpiryValue should have comment or be unexported (golint)
    • Line 66: warning: exported function DecodeExpiryValue should have comment or be unexported (golint)
    • Line 72: warning: exported function DecodeDatakey should have comment or be unexported (golint)
    • Line 87: warning: exported function DecodeDataValue should have comment or be unexported (golint)
    • Line 93: warning: exported function EncodeElgPrioMissingDataKey should have comment or be unexported (golint)
    • Line 108: warning: exported function EncodeElgDeprioMissingDataKey should have comment or be unexported (golint)
    • Line 115: warning: exported function DecodeElgMissingDataKey should have comment or be unexported (golint)
    • Line 125: warning: exported function EncodeInelgMissingDataKey should have comment or be unexported (golint)
    • Line 133: warning: exported function DecodeInelgMissingDataKey should have comment or be unexported (golint)
    • Line 142: warning: exported function EncodeMissingDataValue should have comment or be unexported (golint)
    • Line 146: warning: exported function DecodeMissingDataValue should have comment or be unexported (golint)
    • fabric-peer-ext/pkg/pvtdatastorage/common/helper.go
    • Line 23: warning: exported function PrepareStoreEntries should have comment or be unexported (golint)
    • Line 167: warning: exported function PassesFilter should have comment or be unexported (golint)
    • Line 171: warning: exported function IsExpired should have comment or be unexported (golint)
    • Line 228: warning: exported type TxPvtdataAssembler should have comment or be unexported (golint)
    • Line 235: warning: exported function NewTxPvtdataAssembler should have comment or be unexported (golint)
    • Line 239: warning: exported method TxPvtdataAssembler.Add should have comment or be unexported (golint)
    • Line 262: warning: exported method TxPvtdataAssembler.GetTxPvtdata should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words