Preparing report...

Report for github.com/ElrondNetwork/elrond-go

(v1.3.27)

A+    Excellent!    Found 88 issues across 2423 files

Tweet

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!


gofmt98%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo97%

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.

    • process/transaction/shardProcess.go
    • Line 745: warning: cyclomatic complexity 20 of function (*txProcessor).processUserTx() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 19 of function (*txProcessor).ProcessTransaction() is high (> 15) (gocyclo)
    • Line 84: warning: cyclomatic complexity 16 of function NewTxProcessor() is high (> 15) (gocyclo)
    • trie/sync.go
    • Line 161: warning: cyclomatic complexity 19 of function (*trieSyncer).checkIfSynced() is high (> 15) (gocyclo)
    • vm/systemSmartContracts/esdt.go
    • Line 149: warning: cyclomatic complexity 33 of function (*esdt).Execute() is high (> 15) (gocyclo)
    • Line 714: warning: cyclomatic complexity 21 of function (*esdt).upgradeProperties() is high (> 15) (gocyclo)
    • factory/blockProcessorCreator.go
    • Line 412: warning: cyclomatic complexity 32 of function (*processComponentsFactory).newMetaBlockProcessor() is high (> 15) (gocyclo)
    • Line 87: warning: cyclomatic complexity 27 of function (*processComponentsFactory).newShardBlockProcessor() is high (> 15) (gocyclo)
    • vm/systemSmartContracts/delegation.go
    • Line 185: warning: cyclomatic complexity 49 of function (*delegation).Execute() is high (> 15) (gocyclo)
    • Line 1616: warning: cyclomatic complexity 24 of function (*delegation).unDelegate() is high (> 15) (gocyclo)
    • Line 2013: warning: cyclomatic complexity 22 of function (*delegation).withdraw() is high (> 15) (gocyclo)
    • Line 96: warning: cyclomatic complexity 18 of function NewDelegationSystemSC() is high (> 15) (gocyclo)
    • Line 1419: warning: cyclomatic complexity 16 of function (*delegation).finishDelegateUser() is high (> 15) (gocyclo)
    • factory/processComponents.go
    • Line 203: warning: cyclomatic complexity 48 of function (*processComponentsFactory).Create() is high (> 15) (gocyclo)
    • Line 1391: warning: cyclomatic complexity 24 of function checkProcessComponentsArgs() is high (> 15) (gocyclo)
    • process/smartContract/process.go
    • Line 912: warning: cyclomatic complexity 33 of function (*scProcessor).doExecuteBuiltInFunction() is high (> 15) (gocyclo)
    • Line 151: warning: cyclomatic complexity 23 of function NewSmartContractProcessor() is high (> 15) (gocyclo)
    • Line 2452: warning: cyclomatic complexity 22 of function (*scProcessor).processSCOutputAccounts() is high (> 15) (gocyclo)
    • Line 559: warning: cyclomatic complexity 19 of function (*scProcessor).updateDeveloperRewardsV2() is high (> 15) (gocyclo)
    • Line 1666: warning: cyclomatic complexity 18 of function (*scProcessor).doDeploySmartContract() is high (> 15) (gocyclo)
    • Line 1360: warning: cyclomatic complexity 18 of function (*scProcessor).processIfErrorWithAddedLogs() is high (> 15) (gocyclo)
    • Line 2243: warning: cyclomatic complexity 17 of function (*scProcessor).createSmartContractResults() is high (> 15) (gocyclo)
    • update/genesis/import.go
    • Line 304: warning: cyclomatic complexity 18 of function (*stateImport).importDataTrie() is high (> 15) (gocyclo)
    • Line 434: warning: cyclomatic complexity 17 of function (*stateImport).importState() is high (> 15) (gocyclo)
    • node/node.go
    • Line 849: warning: cyclomatic complexity 18 of function (*Node).CreateTransaction() is high (> 15) (gocyclo)
    • epochStart/metachain/systemSCs.go
    • Line 204: warning: cyclomatic complexity 25 of function (*systemSCProcessor).ProcessSystemSmartContract() is high (> 15) (gocyclo)
    • Line 763: warning: cyclomatic complexity 19 of function (*systemSCProcessor).stakingToValidatorStatistics() is high (> 15) (gocyclo)
    • process/block/shardblock.go
    • Line 140: warning: cyclomatic complexity 30 of function (*shardProcessor).ProcessBlock() is high (> 15) (gocyclo)
    • Line 406: warning: cyclomatic complexity 23 of function (*shardProcessor).checkEpochCorrectness() is high (> 15) (gocyclo)
    • Line 831: warning: cyclomatic complexity 20 of function (*shardProcessor).CommitBlock() is high (> 15) (gocyclo)
    • process/block/metablock.go
    • Line 177: warning: cyclomatic complexity 33 of function (*metaProcessor).ProcessBlock() is high (> 15) (gocyclo)
    • Line 2118: warning: cyclomatic complexity 21 of function (*metaProcessor).applyBodyToHeader() is high (> 15) (gocyclo)
    • Line 1180: warning: cyclomatic complexity 21 of function (*metaProcessor).CommitBlock() is high (> 15) (gocyclo)
    • Line 395: warning: cyclomatic complexity 18 of function (*metaProcessor).processEpochStartMetaBlock() is high (> 15) (gocyclo)
    • Line 1737: warning: cyclomatic complexity 16 of function (*metaProcessor).checkShardHeadersValidity() is high (> 15) (gocyclo)
    • process/scToProtocol/stakingToPeer.go
    • Line 280: warning: cyclomatic complexity 30 of function (*stakingToPeer).updatePeerState() is high (> 15) (gocyclo)
    • Line 218: warning: cyclomatic complexity 19 of function (*stakingToPeer).updatePeerStateV1() is high (> 15) (gocyclo)
    • process/sync/baseSync.go
    • Line 705: warning: cyclomatic complexity 21 of function (*baseBootstrap).rollBack() is high (> 15) (gocyclo)
    • Line 421: warning: cyclomatic complexity 21 of function checkBootstrapNilParameters() is high (> 15) (gocyclo)
    • vm/systemSmartContracts/staking.go
    • Line 161: warning: cyclomatic complexity 34 of function (*stakingSC).Execute() is high (> 15) (gocyclo)
    • Line 978: warning: cyclomatic complexity 22 of function (*stakingSC).removeFromWaitingList() is high (> 15) (gocyclo)
    • Line 613: warning: cyclomatic complexity 17 of function (*stakingSC).unStake() is high (> 15) (gocyclo)
    • storage/factory/pruningStorerFactory.go
    • Line 323: warning: cyclomatic complexity 27 of function (*StorageServiceFactory).CreateForMeta() is high (> 15) (gocyclo)
    • Line 93: warning: cyclomatic complexity 26 of function (*StorageServiceFactory).CreateForShard() is high (> 15) (gocyclo)
    • vm/systemSmartContracts/validator.go
    • Line 191: warning: cyclomatic complexity 26 of function (*validatorSC).Execute() is high (> 15) (gocyclo)
    • Line 916: warning: cyclomatic complexity 25 of function (*validatorSC).stake() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 25 of function NewValidatorSmartContract() is high (> 15) (gocyclo)
    • node/nodeRunner.go
    • Line 238: warning: cyclomatic complexity 21 of function (*nodeRunner).executeOneComponentCreationCycle() is high (> 15) (gocyclo)
    • process/coordinator/process.go
    • Line 1565: warning: cyclomatic complexity 19 of function checkTransactionCoordinatorNilParameters() is high (> 15) (gocyclo)
    • Line 551: warning: cyclomatic complexity 18 of function (*transactionCoordinator).CreateMbsAndProcessCrossShardTransactionsDstMe() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!