Preparing report...

Report for gitlab.com/scpcorp/ScPrime

A+    Excellent!    Found 227 issues across 791 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!


golint99%

Golint is a linter for Go source code.

    • /gitlab.com/scpcorp/ScPrime/modules/miningpool/dependencies.go
    • Line 16: warning: error var mockErrListen should have name of the form errFoo (golint)
    • Line 17: warning: error var mockErrLoadFile should have name of the form errFoo (golint)
    • Line 18: warning: error var mockErrMkdirAll should have name of the form errFoo (golint)
    • Line 19: warning: error var mockErrNewLogger should have name of the form errFoo (golint)
    • Line 20: warning: error var mockErrOpenDatabase should have name of the form errFoo (golint)
    • Line 21: warning: error var mockErrReadFile should have name of the form errFoo (golint)
    • Line 22: warning: error var mockErrRemoveFile should have name of the form errFoo (golint)
    • Line 23: warning: error var mockErrSymlink should have name of the form errFoo (golint)
    • Line 24: warning: error var mockErrWriteFile should have name of the form errFoo (golint)
    • /gitlab.com/scpcorp/ScPrime/modules/host/dependencies.go
    • Line 10: warning: error var mockErrListen should have name of the form errFoo (golint)
    • Line 11: warning: error var mockErrLoadFile should have name of the form errFoo (golint)
    • Line 12: warning: error var mockErrMkdirAll should have name of the form errFoo (golint)
    • Line 13: warning: error var mockErrNewLogger should have name of the form errFoo (golint)
    • Line 14: warning: error var mockErrOpenDatabase should have name of the form errFoo (golint)

gocyclo72%

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.

    • /gitlab.com/scpcorp/ScPrime/modules/consensus/synchronize_test.go
    • Line 1168: warning: cyclomatic complexity 37 of function TestIntegrationRelaySynchronize() is high (> 15) (gocyclo)
    • Line 318: warning: cyclomatic complexity 25 of function TestIntegrationRPCSendBlocks() is high (> 15) (gocyclo)
    • Line 530: warning: cyclomatic complexity 22 of function TestRPCSendBlockSendsOnlyNecessaryBlocks() is high (> 15) (gocyclo)
    • Line 906: warning: cyclomatic complexity 19 of function TestIntegrationSendBlkRPC() is high (> 15) (gocyclo)
    • Line 26: warning: cyclomatic complexity 18 of function TestSynchronize() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/pubaccesskey/pubaccesskey_test.go
    • Line 23: warning: cyclomatic complexity 39 of function TestSkykeyManager() is high (> 15) (gocyclo)
    • Line 429: warning: cyclomatic complexity 27 of function TestSkykeyMarshalling() is high (> 15) (gocyclo)
    • Line 780: warning: cyclomatic complexity 25 of function TestSkykeyDelete() is high (> 15) (gocyclo)
    • Line 667: warning: cyclomatic complexity 23 of function TestSkyfileEncryptionIDs() is high (> 15) (gocyclo)
    • Line 918: warning: cyclomatic complexity 18 of function TestSkykeyDeleteCompat() is high (> 15) (gocyclo)
    • Line 284: warning: cyclomatic complexity 17 of function TestSkykeyFormatCompat() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/node/api/pubaccess.go
    • Line 240: warning: cyclomatic complexity 60 of function (*API).skynetPublinkHandlerGET() is high (> 15) (gocyclo)
    • Line 636: warning: cyclomatic complexity 48 of function (*API).skynetSkyfileHandlerPOST() is high (> 15) (gocyclo)
    • Line 523: warning: cyclomatic complexity 18 of function (*API).skynetPublinkPinHandlerPOST() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/siatest/renter/pubaccess_pubaccesskey_test.go
    • Line 145: warning: cyclomatic complexity 29 of function testCreateSkykey() is high (> 15) (gocyclo)
    • Line 376: warning: cyclomatic complexity 24 of function testUnsafeClient() is high (> 15) (gocyclo)
    • Line 279: warning: cyclomatic complexity 21 of function testDeleteSkykey() is high (> 15) (gocyclo)
    • Line 52: warning: cyclomatic complexity 19 of function testAddSkykey() is high (> 15) (gocyclo)
    • Line 517: warning: cyclomatic complexity 16 of function testSkynetEncryption() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/uploadheap.go
    • Line 1277: warning: cyclomatic complexity 31 of function (*Renter).threadedUploadAndRepair() is high (> 15) (gocyclo)
    • Line 774: warning: cyclomatic complexity 27 of function (*Renter).callBuildAndPushChunks() is high (> 15) (gocyclo)
    • Line 518: warning: cyclomatic complexity 23 of function (*Renter).managedBuildUnfinishedChunks() is high (> 15) (gocyclo)
    • Line 1007: warning: cyclomatic complexity 22 of function (*Renter).managedBuildChunkHeap() is high (> 15) (gocyclo)
    • Line 59: warning: cyclomatic complexity 17 of function (uploadChunkHeap).Less() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/node/api/renterhost_test.go
    • Line 162: warning: cyclomatic complexity 64 of function TestHostAndRentVanilla() is high (> 15) (gocyclo)
    • Line 1727: warning: cyclomatic complexity 46 of function TestRepairLoopBlocking() is high (> 15) (gocyclo)
    • Line 531: warning: cyclomatic complexity 41 of function TestHostAndRentManyFiles() is high (> 15) (gocyclo)
    • Line 1959: warning: cyclomatic complexity 38 of function TestRemoteFileRepairMassive() is high (> 15) (gocyclo)
    • Line 1273: warning: cyclomatic complexity 37 of function TestHostAndRentReload() is high (> 15) (gocyclo)
    • Line 741: warning: cyclomatic complexity 36 of function TestRenterUploadDownload() is high (> 15) (gocyclo)
    • Line 1015: warning: cyclomatic complexity 36 of function TestRenterRenew() is high (> 15) (gocyclo)
    • Line 1444: warning: cyclomatic complexity 32 of function TestHostAndRenterRenewInterrupt() is high (> 15) (gocyclo)
    • Line 1579: warning: cyclomatic complexity 28 of function TestUploadedBytesReporting() is high (> 15) (gocyclo)
    • Line 30: warning: cyclomatic complexity 28 of function TestHostObligationAcceptingContracts() is high (> 15) (gocyclo)
    • Line 885: warning: cyclomatic complexity 25 of function TestRenterParallelDelete() is high (> 15) (gocyclo)
    • Line 415: warning: cyclomatic complexity 24 of function TestHostAndRentMultiHost() is high (> 15) (gocyclo)
    • Line 1161: warning: cyclomatic complexity 20 of function TestRenterAllowance() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/siatest/renter/hostdb/hostdb_test.go
    • Line 723: warning: cyclomatic complexity 59 of function testFilterMode() is high (> 15) (gocyclo)
    • Line 167: warning: cyclomatic complexity 38 of function TestPruneRedundantAddressRange() is high (> 15) (gocyclo)
    • Line 523: warning: cyclomatic complexity 30 of function TestDisableIPViolationCheck() is high (> 15) (gocyclo)
    • Line 368: warning: cyclomatic complexity 29 of function TestSelectRandomCanceledHost() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/siatest/host/host_test.go
    • Line 596: warning: cyclomatic complexity 26 of function TestStorageProofEmptyContract() is high (> 15) (gocyclo)
    • Line 385: warning: cyclomatic complexity 20 of function TestHostContracts() is high (> 15) (gocyclo)
    • Line 288: warning: cyclomatic complexity 19 of function TestHostContract() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 19 of function TestHostBandwidth() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/host/rpcexecuteprogram_test.go
    • Line 718: warning: cyclomatic complexity 28 of function TestVerifyExecuteProgramRevision() is high (> 15) (gocyclo)
    • Line 93: warning: cyclomatic complexity 27 of function TestExecuteReadSectorProgram() is high (> 15) (gocyclo)
    • Line 938: warning: cyclomatic complexity 22 of function TestExecuteAppendProgram() is high (> 15) (gocyclo)
    • Line 392: warning: cyclomatic complexity 21 of function TestExecuteHasSectorProgram() is high (> 15) (gocyclo)
    • Line 583: warning: cyclomatic complexity 19 of function TestExecuteReadOffsetProgram() is high (> 15) (gocyclo)
    • Line 262: warning: cyclomatic complexity 18 of function TestExecuteReadPartialSectorProgram() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/filesystem/siafile/siafile_test.go
    • Line 167: warning: cyclomatic complexity 39 of function TestFileRedundancy() is high (> 15) (gocyclo)
    • Line 304: warning: cyclomatic complexity 35 of function TestFileHealth() is high (> 15) (gocyclo)
    • Line 693: warning: cyclomatic complexity 24 of function TestDefragChunk() is high (> 15) (gocyclo)
    • Line 823: warning: cyclomatic complexity 23 of function TestChunkHealth() is high (> 15) (gocyclo)
    • Line 947: warning: cyclomatic complexity 19 of function TestStuckChunks() is high (> 15) (gocyclo)
    • Line 589: warning: cyclomatic complexity 18 of function TestPruneHosts() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/siatest/renter/contractor/contractor_test.go
    • Line 338: warning: cyclomatic complexity 58 of function TestRenterContracts() is high (> 15) (gocyclo)
    • Line 1396: warning: cyclomatic complexity 57 of function testWatchdogRebroadcastOrSweep() is high (> 15) (gocyclo)
    • Line 1884: warning: cyclomatic complexity 39 of function TestContractorHostRemoval() is high (> 15) (gocyclo)
    • Line 1680: warning: cyclomatic complexity 37 of function TestContractorChurnLimiter() is high (> 15) (gocyclo)
    • Line 2168: warning: cyclomatic complexity 34 of function TestFailedContractRenewalAlert() is high (> 15) (gocyclo)
    • Line 777: warning: cyclomatic complexity 32 of function TestRenterContractInitRecoveryScan() is high (> 15) (gocyclo)
    • Line 936: warning: cyclomatic complexity 29 of function TestRenterContractRecovery() is high (> 15) (gocyclo)
    • Line 2466: warning: cyclomatic complexity 27 of function TestFreshSettingsForRenew() is high (> 15) (gocyclo)
    • Line 636: warning: cyclomatic complexity 27 of function TestRenterContractAutomaticRecoveryScan() is high (> 15) (gocyclo)
    • Line 204: warning: cyclomatic complexity 23 of function TestRemoveRecoverableContracts() is high (> 15) (gocyclo)
    • Line 1165: warning: cyclomatic complexity 22 of function TestLowAllowanceAlert() is high (> 15) (gocyclo)
    • Line 2619: warning: cyclomatic complexity 20 of function TestRenewAlertWarningLevel() is high (> 15) (gocyclo)
    • Line 1087: warning: cyclomatic complexity 17 of function TestRenterDownloadWithDrainedContract() is high (> 15) (gocyclo)
    • Line 2367: warning: cyclomatic complexity 17 of function TestExtendPeriod() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/host/contractmanager/sectorupdate_test.go
    • Line 1734: warning: cyclomatic complexity 50 of function TestFailingStorageFolder() is high (> 15) (gocyclo)
    • Line 38: warning: cyclomatic complexity 46 of function TestAddSector() is high (> 15) (gocyclo)
    • Line 1404: warning: cyclomatic complexity 35 of function TestDeleteSectorVirtual() is high (> 15) (gocyclo)
    • Line 985: warning: cyclomatic complexity 34 of function TestRemoveSector() is high (> 15) (gocyclo)
    • Line 1264: warning: cyclomatic complexity 34 of function TestDeleteSector() is high (> 15) (gocyclo)
    • Line 1125: warning: cyclomatic complexity 34 of function TestRemoveSectorVirtual() is high (> 15) (gocyclo)
    • Line 418: warning: cyclomatic complexity 34 of function TestAddSectorRecovery() is high (> 15) (gocyclo)
    • Line 698: warning: cyclomatic complexity 33 of function TestAddVirtualSectorParallel() is high (> 15) (gocyclo)
    • Line 561: warning: cyclomatic complexity 33 of function TestAddVirtualSectorSerial() is high (> 15) (gocyclo)
    • Line 844: warning: cyclomatic complexity 33 of function TestAddVirtualSectorMassiveParallel() is high (> 15) (gocyclo)
    • Line 1548: warning: cyclomatic complexity 31 of function TestSectorBalancing() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/repair_test.go
    • Line 90: warning: cyclomatic complexity 38 of function TestBubbleHealth() is high (> 15) (gocyclo)
    • Line 675: warning: cyclomatic complexity 30 of function TestRandomStuckDirectory() is high (> 15) (gocyclo)
    • Line 832: warning: cyclomatic complexity 29 of function TestRandomStuckFile() is high (> 15) (gocyclo)
    • Line 1018: warning: cyclomatic complexity 16 of function TestCalculateFileMetadata() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/uploadheap_test.go
    • Line 225: warning: cyclomatic complexity 22 of function TestUploadHeap() is high (> 15) (gocyclo)
    • Line 20: warning: cyclomatic complexity 21 of function TestBuildUnfinishedChunks() is high (> 15) (gocyclo)
    • Line 678: warning: cyclomatic complexity 20 of function TestUploadHeapMaps() is high (> 15) (gocyclo)
    • Line 546: warning: cyclomatic complexity 19 of function TestAddDirectoryBackToHeap() is high (> 15) (gocyclo)
    • Line 326: warning: cyclomatic complexity 18 of function TestAddChunksToHeap() is high (> 15) (gocyclo)
    • Line 425: warning: cyclomatic complexity 17 of function TestAddRemoteChunksToHeap() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/cmd/spc/rentercmd.go
    • Line 731: warning: cyclomatic complexity 52 of function rentersetallowancecmd() is high (> 15) (gocyclo)
    • Line 974: warning: cyclomatic complexity 46 of function rentersetallowancecmdInteractive() is high (> 15) (gocyclo)
    • Line 2164: warning: cyclomatic complexity 24 of function renterfileslistcmd() is high (> 15) (gocyclo)
    • Line 1983: warning: cyclomatic complexity 18 of function downloadprogress() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/contractor/watchdog_test.go
    • Line 192: warning: cyclomatic complexity 46 of function TestWatchdogRevisionCheck() is high (> 15) (gocyclo)
    • Line 445: warning: cyclomatic complexity 23 of function TestWatchdogStorageProofCheck() is high (> 15) (gocyclo)
    • Line 571: warning: cyclomatic complexity 20 of function TestWatchdogGetParents() is high (> 15) (gocyclo)
    • Line 698: warning: cyclomatic complexity 17 of function TestWatchdogPruning() is high (> 15) (gocyclo)
    • Line 839: warning: cyclomatic complexity 16 of function TestWatchdogDependencyAdding() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/node/api/host_test.go
    • Line 563: warning: cyclomatic complexity 34 of function TestResizeNonemptyStorageFolder() is high (> 15) (gocyclo)
    • Line 722: warning: cyclomatic complexity 24 of function TestStorageFolderUnavailable() is high (> 15) (gocyclo)
    • Line 925: warning: cyclomatic complexity 22 of function TestRemoveStorageFolderForced() is high (> 15) (gocyclo)
    • Line 311: warning: cyclomatic complexity 22 of function TestStorageHandler() is high (> 15) (gocyclo)
    • Line 56: warning: cyclomatic complexity 21 of function TestEstimateWeight() is high (> 15) (gocyclo)
    • Line 187: warning: cyclomatic complexity 21 of function TestWorkingStatus() is high (> 15) (gocyclo)
    • Line 1016: warning: cyclomatic complexity 20 of function TestDeleteSector() is high (> 15) (gocyclo)
    • Line 481: warning: cyclomatic complexity 19 of function TestResizeEmptyStorageFolder() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/workerstatus_test.go
    • Line 289: warning: cyclomatic complexity 23 of function TestWorkerHasSectorJobStatus() is high (> 15) (gocyclo)
    • Line 162: warning: cyclomatic complexity 23 of function TestWorkerReadJobStatus() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 16 of function TestWorkerPriceTableStatus() is high (> 15) (gocyclo)
    • Line 21: warning: cyclomatic complexity 16 of function TestWorkerAccountStatus() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/wallet/transactions_test.go
    • Line 146: warning: cyclomatic complexity 23 of function TestIntegrationTransaction() is high (> 15) (gocyclo)
    • Line 484: warning: cyclomatic complexity 18 of function BenchmarkAddressTransactions() is high (> 15) (gocyclo)
    • Line 418: warning: cyclomatic complexity 17 of function TestTransactionInputOutputIDs() is high (> 15) (gocyclo)
    • Line 13: warning: cyclomatic complexity 16 of function TestIntegrationTransactions() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/host/contractmanager/storagefoldershrink_test.go
    • Line 127: warning: cyclomatic complexity 43 of function TestShrinkStorageFolderWithSectors() is high (> 15) (gocyclo)
    • Line 723: warning: cyclomatic complexity 43 of function TestShrinkStorageFolderShutdownAfterMove() is high (> 15) (gocyclo)
    • Line 932: warning: cyclomatic complexity 43 of function TestShrinkStorageFolderWAL() is high (> 15) (gocyclo)
    • Line 332: warning: cyclomatic complexity 34 of function TestShrinkStorageFolderIncompleteWrite() is high (> 15) (gocyclo)
    • Line 510: warning: cyclomatic complexity 33 of function TestShrinkStorageFolderIncompleteWriteForce() is high (> 15) (gocyclo)
    • Line 1138: warning: cyclomatic complexity 32 of function TestShrinkSingleStorageFolder() is high (> 15) (gocyclo)
    • Line 17: warning: cyclomatic complexity 24 of function TestShrinkStorageFolder() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/wallet/seed_test.go
    • Line 91: warning: cyclomatic complexity 23 of function TestLoadSeed() is high (> 15) (gocyclo)
    • Line 340: warning: cyclomatic complexity 20 of function TestSweepSeedSentFunds() is high (> 15) (gocyclo)
    • Line 436: warning: cyclomatic complexity 19 of function TestSweepSeedCoinsAndFunds() is high (> 15) (gocyclo)
    • Line 256: warning: cyclomatic complexity 17 of function TestSweepSeedFunds() is high (> 15) (gocyclo)
    • Line 17: warning: cyclomatic complexity 17 of function TestPrimarySeed() is high (> 15) (gocyclo)
    • Line 181: warning: cyclomatic complexity 16 of function TestSweepSeedCoins() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/dirs_test.go
    • Line 178: warning: cyclomatic complexity 25 of function TestRenterListDirectory() is high (> 15) (gocyclo)
    • Line 291: warning: cyclomatic complexity 24 of function compareDirectoryInfoAndMetadata() is high (> 15) (gocyclo)
    • Line 71: warning: cyclomatic complexity 16 of function (*renterTester).checkDirInitialized() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/node/api/renter_test.go
    • Line 872: warning: cyclomatic complexity 29 of function TestRenterHandlerRename() is high (> 15) (gocyclo)
    • Line 1520: warning: cyclomatic complexity 26 of function TestHealthLoop() is high (> 15) (gocyclo)
    • Line 1298: warning: cyclomatic complexity 22 of function TestRenterPricesHandlerPricey() is high (> 15) (gocyclo)
    • Line 1415: warning: cyclomatic complexity 20 of function TestAdversarialPriceRenewal() is high (> 15) (gocyclo)
    • Line 626: warning: cyclomatic complexity 20 of function TestRenterHandlerContracts() is high (> 15) (gocyclo)
    • Line 137: warning: cyclomatic complexity 20 of function runDownloadTest() is high (> 15) (gocyclo)
    • Line 1213: warning: cyclomatic complexity 19 of function TestRenterPricesHandler() is high (> 15) (gocyclo)
    • Line 718: warning: cyclomatic complexity 19 of function TestRenterHandlerGetAndPost() is high (> 15) (gocyclo)
    • Line 1128: warning: cyclomatic complexity 18 of function TestRenterRelativePathErrorDownload() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 16 of function setupTestDownload() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/host/storageobligations_smoke_test.go
    • Line 428: warning: cyclomatic complexity 36 of function TestMultiSectorStorageObligationStack() is high (> 15) (gocyclo)
    • Line 232: warning: cyclomatic complexity 30 of function TestSingleSectorStorageObligationStack() is high (> 15) (gocyclo)
    • Line 688: warning: cyclomatic complexity 26 of function TestAutoRevisionSubmission() is high (> 15) (gocyclo)
    • Line 128: warning: cyclomatic complexity 20 of function TestBlankStorageObligation() is high (> 15) (gocyclo)
    • Line 836: warning: cyclomatic complexity 17 of function TestLargeContractBlock() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/host/newrpc.go
    • Line 158: warning: cyclomatic complexity 36 of function (*Host).managedRPCLoopWrite() is high (> 15) (gocyclo)
    • Line 1203: warning: cyclomatic complexity 18 of function (*Host).managedRPCLoopDownloadWithToken() is high (> 15) (gocyclo)
    • Line 403: warning: cyclomatic complexity 16 of function (*Host).managedRPCLoopRead() is high (> 15) (gocyclo)
    • Line 717: warning: cyclomatic complexity 16 of function (*Host).managedRPCLoopSectorRoots() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/node/api/wallet_test.go
    • Line 573: warning: cyclomatic complexity 69 of function TestWalletTransactionGETid() is high (> 15) (gocyclo)
    • Line 1407: warning: cyclomatic complexity 25 of function TestWalletSiacoins() is high (> 15) (gocyclo)
    • Line 1118: warning: cyclomatic complexity 24 of function TestWalletSiafunds() is high (> 15) (gocyclo)
    • Line 323: warning: cyclomatic complexity 23 of function TestWalletGETSiacoins() is high (> 15) (gocyclo)
    • Line 1296: warning: cyclomatic complexity 20 of function TestWalletChangePassword() is high (> 15) (gocyclo)
    • Line 954: warning: cyclomatic complexity 19 of function TestWalletRelativePathErrorSiag() is high (> 15) (gocyclo)
    • Line 495: warning: cyclomatic complexity 16 of function TestIntegrationWalletLoadSeedPOST() is high (> 15) (gocyclo)
    • Line 1638: warning: cyclomatic complexity 16 of function TestWalletManyTransactions() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/node/api/hostdb_test.go
    • Line 679: warning: cyclomatic complexity 59 of function TestHostDBAndRenterUploadDynamicIPs() is high (> 15) (gocyclo)
    • Line 456: warning: cyclomatic complexity 49 of function TestHostDBAndRenterDownloadDynamicIPs() is high (> 15) (gocyclo)
    • Line 930: warning: cyclomatic complexity 45 of function TestHostDBAndRenterFormDynamicIPs() is high (> 15) (gocyclo)
    • Line 1136: warning: cyclomatic complexity 42 of function TestHostDBAndRenterRenewDynamicIPs() is high (> 15) (gocyclo)
    • Line 149: warning: cyclomatic complexity 27 of function TestHostDBHostsHandler() is high (> 15) (gocyclo)
    • Line 354: warning: cyclomatic complexity 23 of function TestHostDBScanOnlineOffline() is high (> 15) (gocyclo)
    • Line 29: warning: cyclomatic complexity 22 of function TestHostDBHostsActiveHandler() is high (> 15) (gocyclo)
    • Line 263: warning: cyclomatic complexity 16 of function assembleHostPort() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/siatest/renter/pubaccess_test.go
    • Line 84: warning: cyclomatic complexity 82 of function testPubaccessBasic() is high (> 15) (gocyclo)
    • Line 1044: warning: cyclomatic complexity 58 of function testPubaccessDownloadFormats() is high (> 15) (gocyclo)
    • Line 1481: warning: cyclomatic complexity 50 of function testPubaccessBlacklist() is high (> 15) (gocyclo)
    • Line 2273: warning: cyclomatic complexity 26 of function testPubaccessDefaultPath() is high (> 15) (gocyclo)
    • Line 624: warning: cyclomatic complexity 25 of function testPubaccessMultipartUpload() is high (> 15) (gocyclo)
    • Line 1745: warning: cyclomatic complexity 24 of function testPubaccessPortals() is high (> 15) (gocyclo)
    • Line 2431: warning: cyclomatic complexity 18 of function testPubaccessDefaultPath_TableTest() is high (> 15) (gocyclo)
    • Line 1331: warning: cyclomatic complexity 17 of function testPubaccessSubDirDownload() is high (> 15) (gocyclo)
    • Line 892: warning: cyclomatic complexity 17 of function testPubaccessInvalidFilename() is high (> 15) (gocyclo)
    • Line 1894: warning: cyclomatic complexity 16 of function testPubaccessHeadRequest() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/pubfile.go
    • Line 269: warning: cyclomatic complexity 18 of function (*Renter).managedCreatePublinkFromFileNode() is high (> 15) (gocyclo)
    • Line 930: warning: cyclomatic complexity 18 of function (*Renter).UploadSkyfile() is high (> 15) (gocyclo)
    • Line 820: warning: cyclomatic complexity 18 of function (*Renter).PinPublink() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/gateway/peers_test.go
    • Line 944: warning: cyclomatic complexity 29 of function TestOverloadedBootstrap() is high (> 15) (gocyclo)
    • Line 581: warning: cyclomatic complexity 24 of function TestConnectRejectsVersions() is high (> 15) (gocyclo)
    • Line 227: warning: cyclomatic complexity 24 of function TestListen() is high (> 15) (gocyclo)
    • Line 1066: warning: cyclomatic complexity 20 of function TestPeerManagerPriority() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/siatest/wallet/wallet_test.go
    • Line 573: warning: cyclomatic complexity 24 of function TestWalletSend() is high (> 15) (gocyclo)
    • Line 25: warning: cyclomatic complexity 23 of function TestTransactionReorg() is high (> 15) (gocyclo)
    • Line 225: warning: cyclomatic complexity 21 of function TestWatchOnly() is high (> 15) (gocyclo)
    • Line 342: warning: cyclomatic complexity 19 of function TestUnspentOutputs() is high (> 15) (gocyclo)
    • Line 122: warning: cyclomatic complexity 18 of function TestSignTransaction() is high (> 15) (gocyclo)
    • Line 859: warning: cyclomatic complexity 18 of function TestWalletVerifyPassword() is high (> 15) (gocyclo)
    • Line 499: warning: cyclomatic complexity 17 of function TestWalletLastAddresses() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/hostdb/scan.go
    • Line 368: warning: cyclomatic complexity 30 of function (*HostDB).managedScanHost() is high (> 15) (gocyclo)
    • Line 632: warning: cyclomatic complexity 27 of function (*HostDB).threadedScan() is high (> 15) (gocyclo)
    • Line 221: warning: cyclomatic complexity 24 of function (*HostDB).updateEntry() is high (> 15) (gocyclo)
    • Line 100: warning: cyclomatic complexity 17 of function (*HostDB).queueScan() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/wallet/transactionbuilder_test.go
    • Line 288: warning: cyclomatic complexity 25 of function TestConcurrentBuildersSingleOutput() is high (> 15) (gocyclo)
    • Line 187: warning: cyclomatic complexity 20 of function TestConcurrentBuilders() is high (> 15) (gocyclo)
    • Line 420: warning: cyclomatic complexity 19 of function TestParallelBuilders() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 18 of function TestViewAdded() is high (> 15) (gocyclo)
    • Line 783: warning: cyclomatic complexity 16 of function TestDoubleSpendAfterMarking() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/contractor/contractor_test.go
    • Line 150: warning: cyclomatic complexity 36 of function TestIntegrationSetAllowance() is high (> 15) (gocyclo)
    • Line 500: warning: cyclomatic complexity 28 of function TestPayment() is high (> 15) (gocyclo)
    • Line 356: warning: cyclomatic complexity 25 of function TestHostMaxDuration() is high (> 15) (gocyclo)
    • Line 680: warning: cyclomatic complexity 20 of function TestLinkedContracts() is high (> 15) (gocyclo)
    • Line 791: warning: cyclomatic complexity 17 of function TestPaymentMissingStorageObligation() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/renter/filesystem/filesystem_test.go
    • Line 508: warning: cyclomatic complexity 31 of function TestCloseSiaFile() is high (> 15) (gocyclo)
    • Line 229: warning: cyclomatic complexity 31 of function TestOpenSiaDir() is high (> 15) (gocyclo)
    • Line 1797: warning: cyclomatic complexity 30 of function TestDeleteDirInMemory() is high (> 15) (gocyclo)
    • Line 1539: warning: cyclomatic complexity 28 of function TestSiaDirRenameWithFiles() is high (> 15) (gocyclo)
    • Line 429: warning: cyclomatic complexity 26 of function TestCloseSiaDir() is high (> 15) (gocyclo)
    • Line 924: warning: cyclomatic complexity 26 of function TestAddSiaFileFromReader() is high (> 15) (gocyclo)
    • Line 1413: warning: cyclomatic complexity 24 of function TestSiaDirDelete() is high (> 15) (gocyclo)
    • Line 341: warning: cyclomatic complexity 22 of function TestOpenSiaFile() is high (> 15) (gocyclo)
    • Line 1697: warning: cyclomatic complexity 21 of function TestRenameDirInMemory() is high (> 15) (gocyclo)
    • Line 2055: warning: cyclomatic complexity 20 of function testFileDirConflict() is high (> 15) (gocyclo)
    • Line 809: warning: cyclomatic complexity 18 of function TestSiaDirRename() is high (> 15) (gocyclo)
    • Line 711: warning: cyclomatic complexity 16 of function TestThreadedAccess() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/siatest/renter/renter_test.go
    • Line 2487: warning: cyclomatic complexity 42 of function TestRenterLosingHosts() is high (> 15) (gocyclo)
    • Line 528: warning: cyclomatic complexity 42 of function testDirectories() is high (> 15) (gocyclo)
    • Line 4731: warning: cyclomatic complexity 41 of function TestWorkerStatus() is high (> 15) (gocyclo)
    • Line 2706: warning: cyclomatic complexity 37 of function TestRenterFailingStandbyDownload() is high (> 15) (gocyclo)
    • Line 4454: warning: cyclomatic complexity 35 of function testPauseAndResumeRepairAndUploads() is high (> 15) (gocyclo)
    • Line 378: warning: cyclomatic complexity 32 of function testClearDownloadHistory() is high (> 15) (gocyclo)
    • Line 3553: warning: cyclomatic complexity 32 of function TestSiafileCompatCodeV137() is high (> 15) (gocyclo)
    • Line 2157: warning: cyclomatic complexity 31 of function testRenterAllowanceCancel() is high (> 15) (gocyclo)
    • Line 3296: warning: cyclomatic complexity 31 of function TestRenterFileContractIdentifier() is high (> 15) (gocyclo)
    • Line 106: warning: cyclomatic complexity 30 of function testSiafileTimestamps() is high (> 15) (gocyclo)
    • Line 2006: warning: cyclomatic complexity 28 of function TestRenewFailing() is high (> 15) (gocyclo)
    • Line 2987: warning: cyclomatic complexity 27 of function testZeroByteFile() is high (> 15) (gocyclo)
    • Line 4070: warning: cyclomatic complexity 25 of function TestOutOfStorageHandling() is high (> 15) (gocyclo)
    • Line 980: warning: cyclomatic complexity 23 of function TestLocalRepairCorrupted() is high (> 15) (gocyclo)
    • Line 1196: warning: cyclomatic complexity 23 of function testRemoteRepair() is high (> 15) (gocyclo)
    • Line 3757: warning: cyclomatic complexity 22 of function testFileAvailableAndRecoverable() is high (> 15) (gocyclo)
    • Line 4908: warning: cyclomatic complexity 22 of function TestWorkerSyncBalanceWithHost() is high (> 15) (gocyclo)
    • Line 4281: warning: cyclomatic complexity 20 of function testRenterPostCancelAllowance() is high (> 15) (gocyclo)
    • Line 2890: warning: cyclomatic complexity 19 of function TestRenterPersistData() is high (> 15) (gocyclo)
    • Line 890: warning: cyclomatic complexity 19 of function testLocalRepair() is high (> 15) (gocyclo)
    • Line 3196: warning: cyclomatic complexity 19 of function TestSetFileTrackingPath() is high (> 15) (gocyclo)
    • Line 1627: warning: cyclomatic complexity 18 of function testContractInterrupted() is high (> 15) (gocyclo)
    • Line 1320: warning: cyclomatic complexity 18 of function testSingleFileGet() is high (> 15) (gocyclo)
    • Line 1924: warning: cyclomatic complexity 17 of function testRedundancyReporting() is high (> 15) (gocyclo)
    • Line 2400: warning: cyclomatic complexity 17 of function testOverspendAllowance() is high (> 15) (gocyclo)
    • Line 1106: warning: cyclomatic complexity 16 of function testPriceTablesUpdated() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/node/api/renter.go
    • Line 612: warning: cyclomatic complexity 74 of function (*API).renterHandlerPOST() is high (> 15) (gocyclo)
    • Line 1032: warning: cyclomatic complexity 43 of function (*API).parseRenterContracts() is high (> 15) (gocyclo)
    • Line 1505: warning: cyclomatic complexity 19 of function (*API).renterPricesHandler() is high (> 15) (gocyclo)
    • Line 2069: warning: cyclomatic complexity 16 of function (*API).renterDirHandlerPOST() is high (> 15) (gocyclo)
    • /gitlab.com/scpcorp/ScPrime/modules/transactionpool/update_test.go
    • Line 14: warning: cyclomatic complexity 27 of function TestFindSets() is high (> 15) (gocyclo)
    • Line 169: warning: cyclomatic complexity 26 of function TestValidRevertedTransaction() is high (> 15) (gocyclo)
    • Line 276: warning: cyclomatic complexity 22 of function TestTransactionPoolPruning() is high (> 15) (gocyclo)
    • Line 391: warning: cyclomatic complexity 21 of function TestDatabaseUpgrade() is high (> 15) (gocyclo)

ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


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!