Preparing report...

Report for gitlab.com/NebulousLabs/Sia

A+    Excellent!    Found 253 issues across 824 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!


golint98%

Golint is a linter for Go source code.

    • /gitlab.com/NebulousLabs/Sia/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)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/bubble_test.go
    • Line 156: warning: don't use underscores in Go names; func testBubbleScheduler_Basic should be testBubbleSchedulerBasic (golint)
    • Line 308: warning: don't use underscores in Go names; func testBubbleScheduler_Blocking should be testBubbleSchedulerBlocking (golint)
    • Line 420: warning: don't use underscores in Go names; func testBubbleScheduler_managedQueueParent should be testBubbleSchedulerManagedQueueParent (golint)

gocyclo70%

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/NebulousLabs/Sia/modules/renter/contractor/contractor_test.go
    • Line 151: warning: cyclomatic complexity 36 of function TestIntegrationSetAllowance() is high (> 15) (gocyclo)
    • Line 496: warning: cyclomatic complexity 31 of function TestPayment() is high (> 15) (gocyclo)
    • Line 352: warning: cyclomatic complexity 25 of function TestHostMaxDuration() is high (> 15) (gocyclo)
    • Line 711: warning: cyclomatic complexity 20 of function TestLinkedContracts() is high (> 15) (gocyclo)
    • Line 822: warning: cyclomatic complexity 17 of function TestPaymentMissingStorageObligation() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/node/api/hostdb_test.go
    • Line 684: warning: cyclomatic complexity 61 of function TestHostDBAndRenterUploadDynamicIPs() is high (> 15) (gocyclo)
    • Line 458: warning: cyclomatic complexity 50 of function TestHostDBAndRenterDownloadDynamicIPs() is high (> 15) (gocyclo)
    • Line 941: warning: cyclomatic complexity 46 of function TestHostDBAndRenterFormDynamicIPs() is high (> 15) (gocyclo)
    • Line 1150: warning: cyclomatic complexity 43 of function TestHostDBAndRenterRenewDynamicIPs() is high (> 15) (gocyclo)
    • Line 148: warning: cyclomatic complexity 28 of function TestHostDBHostsHandler() is high (> 15) (gocyclo)
    • Line 356: warning: cyclomatic complexity 23 of function TestHostDBScanOnlineOffline() is high (> 15) (gocyclo)
    • Line 28: warning: cyclomatic complexity 22 of function TestHostDBHostsActiveHandler() is high (> 15) (gocyclo)
    • Line 265: warning: cyclomatic complexity 16 of function assembleHostPort() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/siatest/renter/renter_test.go
    • Line 4727: warning: cyclomatic complexity 45 of function TestWorkerStatus() is high (> 15) (gocyclo)
    • Line 542: warning: cyclomatic complexity 42 of function testDirectories() is high (> 15) (gocyclo)
    • Line 5412: warning: cyclomatic complexity 42 of function TestRenterRepairSize() is high (> 15) (gocyclo)
    • Line 2457: warning: cyclomatic complexity 42 of function TestRenterLosingHosts() is high (> 15) (gocyclo)
    • Line 2678: warning: cyclomatic complexity 38 of function TestRenterFailingStandbyDownload() is high (> 15) (gocyclo)
    • Line 4450: warning: cyclomatic complexity 35 of function testPauseAndResumeRepairAndUploads() is high (> 15) (gocyclo)
    • Line 3520: warning: cyclomatic complexity 32 of function TestSiafileCompatCodeV137() is high (> 15) (gocyclo)
    • Line 392: warning: cyclomatic complexity 32 of function testClearDownloadHistory() is high (> 15) (gocyclo)
    • Line 3263: warning: cyclomatic complexity 31 of function TestRenterFileContractIdentifier() is high (> 15) (gocyclo)
    • Line 2128: warning: cyclomatic complexity 31 of function testRenterAllowanceCancel() is high (> 15) (gocyclo)
    • Line 105: warning: cyclomatic complexity 30 of function testSiafileTimestamps() is high (> 15) (gocyclo)
    • Line 4056: warning: cyclomatic complexity 27 of function TestOutOfStorageHandling() is high (> 15) (gocyclo)
    • Line 5730: warning: cyclomatic complexity 27 of function TestRenterBubble() is high (> 15) (gocyclo)
    • Line 1989: warning: cyclomatic complexity 23 of function TestRenewFailing() is high (> 15) (gocyclo)
    • Line 961: warning: cyclomatic complexity 23 of function TestLocalRepairCorrupted() is high (> 15) (gocyclo)
    • Line 3727: warning: cyclomatic complexity 22 of function testFileAvailableAndRecoverable() is high (> 15) (gocyclo)
    • Line 2963: warning: cyclomatic complexity 21 of function testZeroByteFile() is high (> 15) (gocyclo)
    • Line 4277: warning: cyclomatic complexity 20 of function testRenterPostCancelAllowance() is high (> 15) (gocyclo)
    • Line 2866: warning: cyclomatic complexity 19 of function TestRenterPersistData() is high (> 15) (gocyclo)
    • Line 871: warning: cyclomatic complexity 19 of function testLocalRepair() is high (> 15) (gocyclo)
    • Line 4918: warning: cyclomatic complexity 19 of function TestWorkerSyncBalanceWithHost() is high (> 15) (gocyclo)
    • Line 1610: warning: cyclomatic complexity 18 of function testContractInterrupted() is high (> 15) (gocyclo)
    • Line 3171: warning: cyclomatic complexity 18 of function TestSetFileTrackingPath() is high (> 15) (gocyclo)
    • Line 1179: warning: cyclomatic complexity 18 of function testRemoteRepair() is high (> 15) (gocyclo)
    • Line 1276: warning: cyclomatic complexity 18 of function testSingleFileGet() is high (> 15) (gocyclo)
    • Line 5298: warning: cyclomatic complexity 18 of function TestRenterClean() is high (> 15) (gocyclo)
    • Line 5042: warning: cyclomatic complexity 17 of function TestReadSectorOutputCorrupted() is high (> 15) (gocyclo)
    • Line 2371: warning: cyclomatic complexity 17 of function testOverspendAllowance() is high (> 15) (gocyclo)
    • Line 1907: warning: cyclomatic complexity 17 of function testRedundancyReporting() is high (> 15) (gocyclo)
    • Line 1089: warning: cyclomatic complexity 16 of function testPriceTablesUpdated() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/consensus/synchronize_test.go
    • Line 1228: warning: cyclomatic complexity 40 of function TestIntegrationRelaySynchronize() is high (> 15) (gocyclo)
    • Line 338: warning: cyclomatic complexity 25 of function TestIntegrationRPCSendBlocks() is high (> 15) (gocyclo)
    • Line 550: warning: cyclomatic complexity 25 of function TestRPCSendBlockSendsOnlyNecessaryBlocks() is high (> 15) (gocyclo)
    • Line 946: warning: cyclomatic complexity 21 of function TestIntegrationSendBlkRPC() is high (> 15) (gocyclo)
    • Line 26: warning: cyclomatic complexity 20 of function TestSynchronize() is high (> 15) (gocyclo)
    • Line 121: warning: cyclomatic complexity 16 of function TestBlockHistory() is high (> 15) (gocyclo)
    • Line 821: warning: cyclomatic complexity 16 of function TestThreadedReceiveBlock() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/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/NebulousLabs/Sia/node/api/skynet.go
    • Line 552: warning: cyclomatic complexity 75 of function (*API).skynetSkylinkHandlerGET() is high (> 15) (gocyclo)
    • Line 910: warning: cyclomatic complexity 22 of function (*API).skynetSkylinkPinHandlerPOST() is high (> 15) (gocyclo)
    • Line 412: warning: cyclomatic complexity 21 of function (*API).skynetRootHandlerGET() is high (> 15) (gocyclo)
    • Line 1042: warning: cyclomatic complexity 18 of function (*API).skynetSkyfileHandlerPOST() is high (> 15) (gocyclo)
    • Line 170: warning: cyclomatic complexity 17 of function (*API).skynetBaseSectorHandlerGET() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/host/rpcexecuteprogram_test.go
    • Line 1212: warning: cyclomatic complexity 44 of function TestExecuteUpdateRegistryProgram() is high (> 15) (gocyclo)
    • Line 727: warning: cyclomatic complexity 28 of function TestVerifyExecuteProgramRevision() is high (> 15) (gocyclo)
    • Line 102: warning: cyclomatic complexity 27 of function TestExecuteReadSectorProgram() is high (> 15) (gocyclo)
    • Line 947: warning: cyclomatic complexity 22 of function TestExecuteAppendProgram() is high (> 15) (gocyclo)
    • Line 1469: warning: cyclomatic complexity 21 of function TestExecuteReadRegistryProgram() is high (> 15) (gocyclo)
    • Line 401: warning: cyclomatic complexity 21 of function TestExecuteHasSectorProgram() is high (> 15) (gocyclo)
    • Line 592: warning: cyclomatic complexity 19 of function TestExecuteReadOffsetProgram() is high (> 15) (gocyclo)
    • Line 271: warning: cyclomatic complexity 18 of function TestExecuteReadPartialSectorProgram() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/dirs_test.go
    • Line 204: warning: cyclomatic complexity 30 of function TestRenterListDirectory() is high (> 15) (gocyclo)
    • Line 354: warning: cyclomatic complexity 26 of function compareDirectoryInfoAndMetadataCustom() is high (> 15) (gocyclo)
    • Line 87: warning: cyclomatic complexity 16 of function (*renterTester).checkDirInitialized() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/siatest/renter/skynet_test.go
    • Line 97: warning: cyclomatic complexity 94 of function testSkynetBasic() is high (> 15) (gocyclo)
    • Line 2200: warning: cyclomatic complexity 72 of function testSkynetBlocklist() is high (> 15) (gocyclo)
    • Line 1200: warning: cyclomatic complexity 61 of function testSkynetDownloadFormats() is high (> 15) (gocyclo)
    • Line 1724: warning: cyclomatic complexity 37 of function testSkynetDownloadByRoot() is high (> 15) (gocyclo)
    • Line 4004: warning: cyclomatic complexity 33 of function TestRegistryUpdateRead() is high (> 15) (gocyclo)
    • Line 884: warning: cyclomatic complexity 32 of function testSkynetStats() is high (> 15) (gocyclo)
    • Line 4282: warning: cyclomatic complexity 30 of function testSkynetMetadataMonetizers() is high (> 15) (gocyclo)
    • Line 4471: warning: cyclomatic complexity 27 of function testSkynetMonetization() is high (> 15) (gocyclo)
    • Line 2651: warning: cyclomatic complexity 26 of function testSkynetPortals() is high (> 15) (gocyclo)
    • Line 704: warning: cyclomatic complexity 25 of function testSkynetMultipartUpload() is high (> 15) (gocyclo)
    • Line 1550: warning: cyclomatic complexity 22 of function testSkynetDownloadBaseSector() is high (> 15) (gocyclo)
    • Line 4172: warning: cyclomatic complexity 20 of function TestSkynetCleanupOnError() is high (> 15) (gocyclo)
    • Line 1980: warning: cyclomatic complexity 20 of function testSkynetSubDirDownload() is high (> 15) (gocyclo)
    • Line 3529: warning: cyclomatic complexity 18 of function testSkynetDefaultPath_TableTest() is high (> 15) (gocyclo)
    • Line 1065: warning: cyclomatic complexity 17 of function testSkynetInvalidFilename() is high (> 15) (gocyclo)
    • Line 2800: warning: cyclomatic complexity 16 of function testSkynetHeadRequest() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/repair_test.go
    • Line 1043: warning: cyclomatic complexity 34 of function TestRandomStuckDirectory() is high (> 15) (gocyclo)
    • Line 1693: warning: cyclomatic complexity 33 of function TestPrepareForBubble() is high (> 15) (gocyclo)
    • Line 484: warning: cyclomatic complexity 33 of function TestOldestHealthCheckTime() is high (> 15) (gocyclo)
    • Line 204: warning: cyclomatic complexity 32 of function TestBubbleHealth() is high (> 15) (gocyclo)
    • Line 1210: warning: cyclomatic complexity 30 of function TestRandomStuckFile() is high (> 15) (gocyclo)
    • Line 676: warning: cyclomatic complexity 24 of function TestNumFiles() is high (> 15) (gocyclo)
    • Line 800: warning: cyclomatic complexity 24 of function TestDirectorySize() is high (> 15) (gocyclo)
    • Line 1396: warning: cyclomatic complexity 23 of function TestCalculateFileMetadata() is high (> 15) (gocyclo)
    • Line 923: warning: cyclomatic complexity 22 of function TestDirectoryModTime() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/node/api/wallet_test.go
    • Line 576: warning: cyclomatic complexity 69 of function TestWalletTransactionGETid() is high (> 15) (gocyclo)
    • Line 1406: warning: cyclomatic complexity 30 of function TestWalletSiacoins() is high (> 15) (gocyclo)
    • Line 324: warning: cyclomatic complexity 24 of function TestWalletGETSiacoins() is high (> 15) (gocyclo)
    • Line 1120: warning: cyclomatic complexity 24 of function TestWalletSiafunds() is high (> 15) (gocyclo)
    • Line 1295: warning: cyclomatic complexity 20 of function TestWalletChangePassword() is high (> 15) (gocyclo)
    • Line 956: warning: cyclomatic complexity 19 of function TestWalletRelativePathErrorSiag() is high (> 15) (gocyclo)
    • Line 1657: warning: cyclomatic complexity 16 of function TestWalletManyTransactions() is high (> 15) (gocyclo)
    • Line 498: warning: cyclomatic complexity 16 of function TestIntegrationWalletLoadSeedPOST() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/host/storageobligations_smoke_test.go
    • Line 240: warning: cyclomatic complexity 62 of function TestPruneStaleStorageObligations() is high (> 15) (gocyclo)
    • Line 758: warning: cyclomatic complexity 37 of function TestMultiSectorStorageObligationStack() is high (> 15) (gocyclo)
    • Line 558: warning: cyclomatic complexity 31 of function TestSingleSectorStorageObligationStack() is high (> 15) (gocyclo)
    • Line 1022: warning: cyclomatic complexity 27 of function TestAutoRevisionSubmission() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 21 of function TestBlankStorageObligation() is high (> 15) (gocyclo)
    • Line 1174: warning: cyclomatic complexity 18 of function TestLargeContractBlock() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/siatest/wallet/wallet_test.go
    • Line 586: warning: cyclomatic complexity 28 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 23 of function TestWatchOnly() is high (> 15) (gocyclo)
    • Line 348: warning: cyclomatic complexity 20 of function TestUnspentOutputs() is high (> 15) (gocyclo)
    • Line 892: warning: cyclomatic complexity 18 of function TestWalletVerifyPassword() is high (> 15) (gocyclo)
    • Line 122: warning: cyclomatic complexity 18 of function TestSignTransaction() is high (> 15) (gocyclo)
    • Line 512: warning: cyclomatic complexity 17 of function TestWalletLastAddresses() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/siatest/renter/backup_test.go
    • Line 293: warning: cyclomatic complexity 64 of function TestRemoteBackup() is high (> 15) (gocyclo)
    • Line 25: warning: cyclomatic complexity 36 of function TestCreateLoadBackup() is high (> 15) (gocyclo)
    • Line 601: warning: cyclomatic complexity 27 of function TestBackupRenew() is high (> 15) (gocyclo)
    • Line 197: warning: cyclomatic complexity 18 of function TestInterruptBackup() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/cmd/siac/rentercmd.go
    • Line 666: warning: cyclomatic complexity 52 of function rentersetallowancecmd() is high (> 15) (gocyclo)
    • Line 909: warning: cyclomatic complexity 46 of function rentersetallowancecmdInteractive() is high (> 15) (gocyclo)
    • Line 1714: warning: cyclomatic complexity 27 of function renterfileslistcmd() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/uploadheap_test.go
    • Line 258: warning: cyclomatic complexity 29 of function testUploadHeapBasic() is high (> 15) (gocyclo)
    • Line 775: warning: cyclomatic complexity 22 of function testUploadHeapMaps() is high (> 15) (gocyclo)
    • Line 53: warning: cyclomatic complexity 21 of function testManagedBuildUnfinishedChunks() is high (> 15) (gocyclo)
    • Line 408: warning: cyclomatic complexity 21 of function testManagedAddChunksToHeap() is high (> 15) (gocyclo)
    • Line 644: warning: cyclomatic complexity 20 of function testAddDirectoryBackToHeap() is high (> 15) (gocyclo)
    • Line 523: warning: cyclomatic complexity 18 of function testAddRemoteChunksToHeap() is high (> 15) (gocyclo)
    • Line 982: warning: cyclomatic complexity 16 of function testManagedPushChunkForRepair() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/gateway/peers_test.go
    • Line 1005: warning: cyclomatic complexity 29 of function TestOverloadedBootstrap() is high (> 15) (gocyclo)
    • Line 614: warning: cyclomatic complexity 26 of function TestConnectRejectsVersions() is high (> 15) (gocyclo)
    • Line 243: warning: cyclomatic complexity 25 of function TestListen() is high (> 15) (gocyclo)
    • Line 1127: warning: cyclomatic complexity 23 of function TestPeerManagerPriority() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/uploadheap.go
    • Line 1460: warning: cyclomatic complexity 30 of function (*Renter).threadedUploadAndRepair() is high (> 15) (gocyclo)
    • Line 892: warning: cyclomatic complexity 29 of function (*Renter).callBuildAndPushChunks() is high (> 15) (gocyclo)
    • Line 1135: warning: cyclomatic complexity 25 of function (*Renter).managedBuildChunkHeap() is high (> 15) (gocyclo)
    • Line 627: warning: cyclomatic complexity 22 of function (*Renter).managedBuildUnfinishedChunks() is high (> 15) (gocyclo)
    • Line 73: warning: cyclomatic complexity 17 of function (uploadChunkHeap).Less() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/host/contractmanager/sectorupdate_test.go
    • Line 1738: warning: cyclomatic complexity 50 of function TestFailingStorageFolder() is high (> 15) (gocyclo)
    • Line 39: warning: cyclomatic complexity 46 of function TestAddSector() is high (> 15) (gocyclo)
    • Line 1960: warning: cyclomatic complexity 46 of function TestAddVirtualSectorOverflow() is high (> 15) (gocyclo)
    • Line 1408: warning: cyclomatic complexity 35 of function TestDeleteSectorVirtual() is high (> 15) (gocyclo)
    • Line 1129: warning: cyclomatic complexity 34 of function TestRemoveSectorVirtual() is high (> 15) (gocyclo)
    • Line 1268: warning: cyclomatic complexity 34 of function TestDeleteSector() is high (> 15) (gocyclo)
    • Line 989: warning: cyclomatic complexity 34 of function TestRemoveSector() is high (> 15) (gocyclo)
    • Line 843: warning: cyclomatic complexity 34 of function TestAddVirtualSectorMassiveParallel() is high (> 15) (gocyclo)
    • Line 417: warning: cyclomatic complexity 34 of function TestAddSectorRecovery() is high (> 15) (gocyclo)
    • Line 560: warning: cyclomatic complexity 33 of function TestAddVirtualSectorSerial() is high (> 15) (gocyclo)
    • Line 697: warning: cyclomatic complexity 33 of function TestAddVirtualSectorParallel() is high (> 15) (gocyclo)
    • Line 1552: warning: cyclomatic complexity 31 of function TestSectorBalancing() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/skykey/skykey_test.go
    • Line 23: warning: cyclomatic complexity 39 of function TestSkykeyManager() is high (> 15) (gocyclo)
    • Line 445: warning: cyclomatic complexity 27 of function TestSkykeyMarshalling() is high (> 15) (gocyclo)
    • Line 796: warning: cyclomatic complexity 25 of function TestSkykeyDelete() is high (> 15) (gocyclo)
    • Line 683: warning: cyclomatic complexity 23 of function TestSkyfileEncryptionIDs() is high (> 15) (gocyclo)
    • Line 934: warning: cyclomatic complexity 18 of function TestSkykeyDeleteCompat() is high (> 15) (gocyclo)
    • Line 210: warning: cyclomatic complexity 18 of function TestSkykeyDerivations() is high (> 15) (gocyclo)
    • Line 300: warning: cyclomatic complexity 17 of function TestSkykeyFormatCompat() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/siatest/host/host_test.go
    • Line 632: warning: cyclomatic complexity 26 of function TestStorageProofEmptyContract() is high (> 15) (gocyclo)
    • Line 290: warning: cyclomatic complexity 23 of function TestHostContracts() is high (> 15) (gocyclo)
    • Line 408: warning: cyclomatic complexity 21 of function TestHostContract() is high (> 15) (gocyclo)
    • Line 209: warning: cyclomatic complexity 19 of function TestHostBandwidth() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/contractor/watchdog_test.go
    • Line 193: warning: cyclomatic complexity 46 of function TestWatchdogRevisionCheck() is high (> 15) (gocyclo)
    • Line 446: warning: cyclomatic complexity 23 of function TestWatchdogStorageProofCheck() is high (> 15) (gocyclo)
    • Line 572: warning: cyclomatic complexity 20 of function TestWatchdogGetParents() is high (> 15) (gocyclo)
    • Line 699: warning: cyclomatic complexity 17 of function TestWatchdogPruning() is high (> 15) (gocyclo)
    • Line 840: warning: cyclomatic complexity 16 of function TestWatchdogDependencyAdding() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/wallet/transactionbuilder_test.go
    • Line 297: warning: cyclomatic complexity 26 of function TestConcurrentBuildersSingleOutput() is high (> 15) (gocyclo)
    • Line 192: warning: cyclomatic complexity 21 of function TestConcurrentBuilders() is high (> 15) (gocyclo)
    • Line 433: warning: cyclomatic complexity 20 of function TestParallelBuilders() is high (> 15) (gocyclo)
    • Line 37: warning: cyclomatic complexity 19 of function TestViewAdded() is high (> 15) (gocyclo)
    • Line 814: warning: cyclomatic complexity 17 of function TestDoubleSpendAfterMarking() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/wallet/seed_test.go
    • Line 578: warning: cyclomatic complexity 27 of function TestMarkAddressUnused() is high (> 15) (gocyclo)
    • Line 365: warning: cyclomatic complexity 25 of function TestSweepSeedSentFunds() is high (> 15) (gocyclo)
    • Line 96: warning: cyclomatic complexity 25 of function TestLoadSeed() is high (> 15) (gocyclo)
    • Line 473: warning: cyclomatic complexity 24 of function TestSweepSeedCoinsAndFunds() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 20 of function TestSweepSeedFunds() is high (> 15) (gocyclo)
    • Line 18: warning: cyclomatic complexity 18 of function TestPrimarySeed() is high (> 15) (gocyclo)
    • Line 194: warning: cyclomatic complexity 17 of function TestSweepSeedCoins() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/repair.go
    • Line 555: warning: cyclomatic complexity 19 of function (*Renter).threadedUpdateRenterHealth() is high (> 15) (gocyclo)
    • Line 450: warning: cyclomatic complexity 19 of function (*Renter).threadedStuckFileLoop() is high (> 15) (gocyclo)
    • Line 174: warning: cyclomatic complexity 16 of function (*Renter).managedOldestHealthCheckTime() is high (> 15) (gocyclo)
    • Line 337: warning: cyclomatic complexity 16 of function (*Renter).managedStuckFile() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/host/registry/registry_test.go
    • Line 987: warning: cyclomatic complexity 45 of function TestTruncate() is high (> 15) (gocyclo)
    • Line 198: warning: cyclomatic complexity 43 of function TestUpdate() is high (> 15) (gocyclo)
    • Line 471: warning: cyclomatic complexity 30 of function TestPrune() is high (> 15) (gocyclo)
    • Line 604: warning: cyclomatic complexity 29 of function TestFullRegistry() is high (> 15) (gocyclo)
    • Line 744: warning: cyclomatic complexity 26 of function TestRegistryRace() is high (> 15) (gocyclo)
    • Line 1288: warning: cyclomatic complexity 23 of function TestTruncateForce() is high (> 15) (gocyclo)
    • Line 1183: warning: cyclomatic complexity 20 of function TestMigrate() is high (> 15) (gocyclo)
    • Line 104: warning: cyclomatic complexity 19 of function TestNew() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/siatest/renter/hostdb/hostdb_test.go
    • Line 722: warning: cyclomatic complexity 59 of function testFilterMode() is high (> 15) (gocyclo)
    • Line 166: warning: cyclomatic complexity 38 of function TestPruneRedundantAddressRange() is high (> 15) (gocyclo)
    • Line 522: warning: cyclomatic complexity 30 of function TestDisableIPViolationCheck() is high (> 15) (gocyclo)
    • Line 367: warning: cyclomatic complexity 29 of function TestSelectRandomCanceledHost() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/filesystem/filesystem_test.go
    • Line 257: warning: cyclomatic complexity 34 of function TestOpenSiaDir() is high (> 15) (gocyclo)
    • Line 559: warning: cyclomatic complexity 31 of function TestCloseSiaFile() is high (> 15) (gocyclo)
    • Line 1615: warning: cyclomatic complexity 30 of function TestSiaDirRenameWithFiles() is high (> 15) (gocyclo)
    • Line 1883: warning: cyclomatic complexity 29 of function TestDeleteDirInMemory() is high (> 15) (gocyclo)
    • Line 478: warning: cyclomatic complexity 27 of function TestCloseSiaDir() is high (> 15) (gocyclo)
    • Line 1480: warning: cyclomatic complexity 26 of function TestSiaDirDelete() is high (> 15) (gocyclo)
    • Line 985: warning: cyclomatic complexity 26 of function TestAddSiaFileFromReader() is high (> 15) (gocyclo)
    • Line 382: warning: cyclomatic complexity 24 of function TestOpenSiaFile() is high (> 15) (gocyclo)
    • Line 1781: warning: cyclomatic complexity 22 of function TestRenameDirInMemory() is high (> 15) (gocyclo)
    • Line 860: warning: cyclomatic complexity 21 of function TestSiaDirRename() is high (> 15) (gocyclo)
    • Line 2147: warning: cyclomatic complexity 20 of function testFileDirConflict() is high (> 15) (gocyclo)
    • Line 762: warning: cyclomatic complexity 16 of function TestThreadedAccess() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/siatest/renter/contractor/contractor_test.go
    • Line 1427: warning: cyclomatic complexity 62 of function testWatchdogRebroadcastOrSweep() is high (> 15) (gocyclo)
    • Line 329: warning: cyclomatic complexity 58 of function TestRenterContracts() is high (> 15) (gocyclo)
    • Line 1936: warning: cyclomatic complexity 39 of function TestContractorHostRemoval() is high (> 15) (gocyclo)
    • Line 788: warning: cyclomatic complexity 38 of function TestRenterContractInitRecoveryScan() is high (> 15) (gocyclo)
    • Line 1732: warning: cyclomatic complexity 37 of function TestContractorChurnLimiter() is high (> 15) (gocyclo)
    • Line 2220: warning: cyclomatic complexity 36 of function TestFailedContractRenewalAlert() is high (> 15) (gocyclo)
    • Line 627: warning: cyclomatic complexity 31 of function TestRenterContractAutomaticRecoveryScan() is high (> 15) (gocyclo)
    • Line 976: warning: cyclomatic complexity 29 of function TestRenterContractRecovery() is high (> 15) (gocyclo)
    • Line 2523: warning: cyclomatic complexity 27 of function TestFreshSettingsForRenew() is high (> 15) (gocyclo)
    • Line 195: warning: cyclomatic complexity 23 of function TestRemoveRecoverableContracts() is high (> 15) (gocyclo)
    • Line 1204: warning: cyclomatic complexity 22 of function TestLowAllowanceAlert() is high (> 15) (gocyclo)
    • Line 2675: warning: cyclomatic complexity 20 of function TestRenewAlertWarningLevel() is high (> 15) (gocyclo)
    • Line 1127: warning: cyclomatic complexity 17 of function TestRenterDownloadWithDrainedContract() is high (> 15) (gocyclo)
    • Line 2424: warning: cyclomatic complexity 17 of function TestExtendPeriod() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/workerstatus_test.go
    • Line 379: warning: cyclomatic complexity 36 of function TestWorkerRegistryJobStatus() is high (> 15) (gocyclo)
    • Line 255: warning: cyclomatic complexity 23 of function TestWorkerHasSectorJobStatus() is high (> 15) (gocyclo)
    • Line 162: warning: cyclomatic complexity 18 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/NebulousLabs/Sia/modules/renter/registry.go
    • Line 431: warning: cyclomatic complexity 23 of function (*Renter).managedUpdateRegistry() is high (> 15) (gocyclo)
    • Line 290: warning: cyclomatic complexity 23 of function (*Renter).managedReadRegistry() is high (> 15) (gocyclo)
    • Line 164: warning: cyclomatic complexity 16 of function (*readRegistryStats).threadedAddResponseSet() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/node/api/renterhost_test.go
    • Line 168: warning: cyclomatic complexity 65 of function TestHostAndRentVanilla() is high (> 15) (gocyclo)
    • Line 1777: warning: cyclomatic complexity 53 of function TestRepairLoopBlocking() is high (> 15) (gocyclo)
    • Line 2033: warning: cyclomatic complexity 43 of function TestRemoteFileRepairMassive() is high (> 15) (gocyclo)
    • Line 550: warning: cyclomatic complexity 42 of function TestHostAndRentManyFiles() is high (> 15) (gocyclo)
    • Line 1038: warning: cyclomatic complexity 36 of function TestRenterRenew() is high (> 15) (gocyclo)
    • Line 1304: warning: cyclomatic complexity 36 of function TestHostAndRentReload() is high (> 15) (gocyclo)
    • Line 763: warning: cyclomatic complexity 36 of function TestRenterUploadDownload() is high (> 15) (gocyclo)
    • Line 1479: warning: cyclomatic complexity 34 of function TestHostAndRenterRenewInterrupt() is high (> 15) (gocyclo)
    • Line 1620: warning: cyclomatic complexity 29 of function TestUploadedBytesReporting() is high (> 15) (gocyclo)
    • Line 28: warning: cyclomatic complexity 28 of function TestHostObligationAcceptingContracts() is high (> 15) (gocyclo)
    • Line 914: warning: cyclomatic complexity 26 of function TestRenterParallelDelete() is high (> 15) (gocyclo)
    • Line 431: warning: cyclomatic complexity 25 of function TestHostAndRentMultiHost() is high (> 15) (gocyclo)
    • Line 1189: warning: cyclomatic complexity 21 of function TestRenterAllowance() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/skyfile.go
    • Line 799: warning: cyclomatic complexity 24 of function (*Renter).RestoreSkyfile() is high (> 15) (gocyclo)
    • Line 690: warning: cyclomatic complexity 18 of function (*Renter).PinSkylink() is high (> 15) (gocyclo)
    • Line 196: warning: cyclomatic complexity 16 of function (*Renter).managedCreateSkylinkFromFileNode() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/hostdb/scan.go
    • Line 561: warning: cyclomatic complexity 27 of function (*HostDB).threadedScan() is high (> 15) (gocyclo)
    • Line 366: warning: cyclomatic complexity 24 of function (*HostDB).managedScanHost() is high (> 15) (gocyclo)
    • Line 219: warning: cyclomatic complexity 24 of function (*HostDB).updateEntry() is high (> 15) (gocyclo)
    • Line 98: warning: cyclomatic complexity 17 of function (*HostDB).queueScan() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/node/api/renter_test.go
    • Line 882: warning: cyclomatic complexity 28 of function TestRenterHandlerRename() is high (> 15) (gocyclo)
    • Line 1532: warning: cyclomatic complexity 26 of function TestHealthLoop() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 24 of function runDownloadTest() is high (> 15) (gocyclo)
    • Line 1305: warning: cyclomatic complexity 22 of function TestRenterPricesHandlerPricey() is high (> 15) (gocyclo)
    • Line 1422: warning: cyclomatic complexity 21 of function TestAdversarialPriceRenewal() is high (> 15) (gocyclo)
    • Line 642: warning: cyclomatic complexity 20 of function TestRenterHandlerContracts() is high (> 15) (gocyclo)
    • Line 1133: warning: cyclomatic complexity 19 of function TestRenterRelativePathErrorDownload() is high (> 15) (gocyclo)
    • Line 1218: warning: cyclomatic complexity 19 of function TestRenterPricesHandler() is high (> 15) (gocyclo)
    • Line 734: warning: cyclomatic complexity 19 of function TestRenterHandlerGetAndPost() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/host/newrpc.go
    • Line 162: warning: cyclomatic complexity 36 of function (*Host).managedRPCLoopWrite() is high (> 15) (gocyclo)
    • Line 407: warning: cyclomatic complexity 29 of function (*Host).managedRPCLoopRead() is high (> 15) (gocyclo)
    • Line 675: warning: cyclomatic complexity 16 of function (*Host).managedRPCLoopSectorRoots() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/filesystem/siafile/siafile_test.go
    • Line 305: warning: cyclomatic complexity 68 of function TestFileHealth() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 39 of function TestFileRedundancy() is high (> 15) (gocyclo)
    • Line 952: warning: cyclomatic complexity 30 of function TestChunkHealth() is high (> 15) (gocyclo)
    • Line 822: warning: cyclomatic complexity 24 of function TestDefragChunk() is high (> 15) (gocyclo)
    • Line 1098: warning: cyclomatic complexity 19 of function TestStuckChunks() is high (> 15) (gocyclo)
    • Line 718: warning: cyclomatic complexity 18 of function TestPruneHosts() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/renter/workersubscription_test.go
    • Line 260: warning: cyclomatic complexity 41 of function TestSubscriptionLoop() is high (> 15) (gocyclo)
    • Line 827: warning: cyclomatic complexity 36 of function TestHandleNotification() is high (> 15) (gocyclo)
    • Line 575: warning: cyclomatic complexity 34 of function TestSubscriptionNotifications() is high (> 15) (gocyclo)
    • Line 1150: warning: cyclomatic complexity 26 of function TestThreadedSubscriptionLoop() is high (> 15) (gocyclo)
    • Line 60: warning: cyclomatic complexity 17 of function TestSubscriptionHelpersWithWorker() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/node/api/host_test.go
    • Line 568: warning: cyclomatic complexity 33 of function TestResizeNonemptyStorageFolder() is high (> 15) (gocyclo)
    • Line 728: warning: cyclomatic complexity 27 of function TestStorageFolderUnavailable() is high (> 15) (gocyclo)
    • Line 184: warning: cyclomatic complexity 21 of function TestWorkingStatus() is high (> 15) (gocyclo)
    • Line 939: warning: cyclomatic complexity 21 of function TestRemoveStorageFolderForced() is high (> 15) (gocyclo)
    • Line 55: warning: cyclomatic complexity 21 of function TestEstimateWeight() is high (> 15) (gocyclo)
    • Line 315: warning: cyclomatic complexity 21 of function TestStorageHandler() is high (> 15) (gocyclo)
    • Line 1031: warning: cyclomatic complexity 19 of function TestDeleteSector() is high (> 15) (gocyclo)
    • Line 486: warning: cyclomatic complexity 19 of function TestResizeEmptyStorageFolder() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/modules/wallet/transactions_test.go
    • Line 150: warning: cyclomatic complexity 24 of function TestIntegrationTransaction() is high (> 15) (gocyclo)
    • Line 512: warning: cyclomatic complexity 20 of function BenchmarkAddressTransactions() is high (> 15) (gocyclo)
    • Line 442: warning: cyclomatic complexity 18 of function TestTransactionInputOutputIDs() is high (> 15) (gocyclo)
    • Line 371: warning: cyclomatic complexity 16 of function TestAddressTransactionRevertedBlock() is high (> 15) (gocyclo)
    • Line 13: warning: cyclomatic complexity 16 of function TestIntegrationTransactions() is high (> 15) (gocyclo)
    • /gitlab.com/NebulousLabs/Sia/node/api/renter.go
    • Line 688: warning: cyclomatic complexity 75 of function (*API).renterHandlerPOST() is high (> 15) (gocyclo)
    • Line 1130: warning: cyclomatic complexity 42 of function (*API).parseRenterContracts() is high (> 15) (gocyclo)
    • Line 1627: warning: cyclomatic complexity 19 of function (*API).renterPricesHandler() is high (> 15) (gocyclo)
    • Line 2221: warning: cyclomatic complexity 16 of function (*API).renterDirHandlerPOST() is high (> 15) (gocyclo)

ineffassign96%

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!