Preparing report...

Report for github.com/vulcanize/eth-contract-watcher

A+    Excellent!    Found 27 issues across 67 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.


golint67%

Golint is a linter for Go source code.

    • eth-contract-watcher/pkg/fakes/mock_parser.go
    • Line 25: warning: exported type MockParser should have comment or be unexported (golint)
    • Line 31: warning: exported method MockParser.Parse should have comment or be unexported (golint)
    • Line 35: warning: exported method MockParser.ParseAbiStr should have comment or be unexported (golint)
    • Line 40: warning: exported method MockParser.Abi should have comment or be unexported (golint)
    • Line 44: warning: exported method MockParser.ParsedAbi should have comment or be unexported (golint)
    • Line 48: warning: exported method MockParser.GetMethods should have comment or be unexported (golint)
    • Line 52: warning: exported method MockParser.GetSelectMethods should have comment or be unexported (golint)
    • Line 56: warning: exported method MockParser.GetEvents should have comment or be unexported (golint)
    • eth-contract-watcher/pkg/fakes/mock_poller.go
    • Line 23: warning: exported type MockPoller should have comment or be unexported (golint)
    • Line 27: warning: exported method MockPoller.PollContract should have comment or be unexported (golint)
    • Line 31: warning: exported method MockPoller.PollContractAt should have comment or be unexported (golint)
    • Line 35: warning: exported method MockPoller.FetchContractData should have comment or be unexported (golint)
    • eth-contract-watcher/pkg/helpers/test_helpers/database.go
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 22: warning: should not use dot imports (golint)
    • Line 37: warning: exported type TransferLog should have comment or be unexported (golint)
    • Line 48: warning: exported type NewOwnerLog should have comment or be unexported (golint)
    • Line 59: warning: exported type HeaderSyncTransferLog should have comment or be unexported (golint)
    • Line 71: warning: exported type HeaderSyncNewOwnerLog should have comment or be unexported (golint)
    • Line 83: warning: exported type BalanceOf should have comment or be unexported (golint)
    • Line 91: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 99: warning: exported type Owner should have comment or be unexported (golint)
    • Line 107: warning: exported function SetupHeaderFetcher should have comment or be unexported (golint)
    • Line 120: warning: exported function SetupDBandClient should have comment or be unexported (golint)
    • Line 138: warning: exported function SetupTusdContract should have comment or be unexported (golint)
    • Line 156: warning: exported function SetupENSContract should have comment or be unexported (golint)
    • Line 174: warning: exported function SetupMarketPlaceContract should have comment or be unexported (golint)
    • Line 192: warning: exported function SetupMolochContract should have comment or be unexported (golint)
    • Line 210: warning: comment on exported function TearDown should be of the form "TearDown ..." (golint)
    • eth-contract-watcher/pkg/fakes/mock_fetcher.go
    • Line 24: warning: should not use dot imports (golint)
    • Line 29: warning: exported type MockFetcher should have comment or be unexported (golint)
    • Line 43: warning: exported function NewMockFetcher should have comment or be unexported (golint)
    • Line 47: warning: exported method MockFetcher.SetFetchContractDataErr should have comment or be unexported (golint)
    • Line 51: warning: exported method MockFetcher.SetGetEthLogsWithCustomQueryErr should have comment or be unexported (golint)
    • Line 55: warning: exported method MockFetcher.SetGetEthLogsWithCustomQueryReturnLogs should have comment or be unexported (golint)
    • Line 59: warning: exported method MockFetcher.FetchContractData should have comment or be unexported (golint)
    • Line 69: warning: exported method MockFetcher.GetEthLogsWithCustomQuery should have comment or be unexported (golint)
    • Line 74: warning: exported method MockFetcher.CallContract should have comment or be unexported (golint)
    • Line 78: warning: exported method MockFetcher.AssertFetchContractDataCalledWith should have comment or be unexported (golint)
    • Line 89: warning: exported method MockFetcher.AssertGetEthLogsWithCustomQueryCalledWith should have comment or be unexported (golint)
    • Line 93: warning: exported method MockFetcher.Node should have comment or be unexported (golint)
    • Line 93: warning: receiver name fetcher should be consistent with previous receiver name fethcer for MockFetcher (golint)
    • eth-contract-watcher/pkg/abi/abi.go
    • Line 32: warning: exported var ErrInvalidAbiFile should have comment or be unexported (golint)
    • Line 37: warning: exported type Response should have comment or be unexported (golint)
    • Line 43: warning: exported type EtherScanAPI should have comment or be unexported (golint)
    • Line 48: warning: exported function NewEtherScanClient should have comment or be unexported (golint)
    • Line 55: warning: exported function GenURL should have comment or be unexported (golint)
    • Line 68: warning: comment on exported method EtherScanAPI.GetAbi should be of the form "GetAbi ..." (golint)
    • Line 81: warning: exported function ParseAbiFile should have comment or be unexported (golint)
    • Line 89: warning: exported function ParseAbi should have comment or be unexported (golint)
    • Line 97: warning: exported function ReadAbiFile should have comment or be unexported (golint)
    • eth-contract-watcher/pkg/constants/constants.go
    • Line 29: warning: exported const TransferEvent should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: comment on exported var DaiContractAddress should be of the form "DaiContractAddress ..." (golint)
    • Line 72: warning: exported var TusdContractAddress should have comment or be unexported (golint)
    • Line 73: warning: exported var EnsContractAddress should have comment or be unexported (golint)
    • Line 74: warning: exported var MarketPlaceContractAddress should have comment or be unexported (golint)
    • Line 75: warning: exported var MolochContractAddress should have comment or be unexported (golint)
    • Line 76: warning: exported var PublicResolverAddress should have comment or be unexported (golint)
    • Line 78: warning: comment on exported var DaiAbiString should be of the form "DaiAbiString ..." (golint)
    • Line 81: warning: exported var TusdAbiString should have comment or be unexported (golint)
    • Line 83: warning: exported var ENSAbiString should have comment or be unexported (golint)
    • Line 85: warning: exported var MarketPlaceAbiString should have comment or be unexported (golint)
    • Line 87: warning: exported var MolochAbiString should have comment or be unexported (golint)
    • eth-contract-watcher/pkg/fakes/mock_header_sync_header_repository.go
    • Line 5: warning: exported type MockHeaderSyncHeaderRepository should have comment or be unexported (golint)
    • Line 8: warning: exported method MockHeaderSyncHeaderRepository.AddCheckColumn should have comment or be unexported (golint)
    • Line 12: warning: exported method MockHeaderSyncHeaderRepository.AddCheckColumns should have comment or be unexported (golint)
    • Line 16: warning: exported method MockHeaderSyncHeaderRepository.MarkHeaderChecked should have comment or be unexported (golint)
    • Line 20: warning: exported method MockHeaderSyncHeaderRepository.MarkHeaderCheckedForAll should have comment or be unexported (golint)
    • Line 24: warning: exported method MockHeaderSyncHeaderRepository.MarkHeadersCheckedForAll should have comment or be unexported (golint)
    • Line 28: warning: exported method MockHeaderSyncHeaderRepository.MissingHeaders should have comment or be unexported (golint)
    • Line 32: warning: exported method MockHeaderSyncHeaderRepository.MissingMethodsCheckedEventsIntersection should have comment or be unexported (golint)
    • Line 36: warning: exported method MockHeaderSyncHeaderRepository.MissingHeadersForAll should have comment or be unexported (golint)
    • Line 40: warning: exported method MockHeaderSyncHeaderRepository.CheckCache should have comment or be unexported (golint)
    • eth-contract-watcher/pkg/fetcher/base_fetcher.go
    • Line 34: warning: exported type Fetcher should have comment or be unexported (golint)
    • Line 39: warning: exported function NewFetcher should have comment or be unexported (golint)
    • Line 46: warning: exported method Fetcher.FetchEthLogsWithCustomQuery should have comment or be unexported (golint)
    • Line 57: warning: exported method Fetcher.FetchContractData should have comment or be unexported (golint)
    • eth-contract-watcher/pkg/config/contract.go
    • Line 27: warning: comment on exported type ContractConfig should be of the form "ContractConfig ..." (with optional leading article) (golint)
    • Line 70: warning: exported method ContractConfig.PrepConfig should have comment or be unexported (golint)
    • eth-contract-watcher/pkg/helpers/test_helpers/mocks/entities.go
    • Line 34: warning: exported var ExpectedTransferFilter should have comment or be unexported (golint)
    • Line 42: warning: exported var ExpectedApprovalFilter should have comment or be unexported (golint)
    • Line 52: warning: exported var MockHeader1 should have comment or be unexported (golint)
    • Line 59: warning: exported var MockHeader2 should have comment or be unexported (golint)
    • Line 66: warning: exported var MockHeader3 should have comment or be unexported (golint)
    • Line 73: warning: exported var MockHeader4 should have comment or be unexported (golint)
    • Line 80: warning: exported var MockTransferLog1 should have comment or be unexported (golint)
    • Line 94: warning: exported var MockTransferLog2 should have comment or be unexported (golint)
    • Line 108: warning: exported var MockNewOwnerLog1 should have comment or be unexported (golint)
    • Line 122: warning: exported var MockNewOwnerLog2 should have comment or be unexported (golint)
    • Line 136: warning: exported var MockOrderCreatedLog should have comment or be unexported (golint)
    • Line 152: warning: exported var MockSubmitVoteLog should have comment or be unexported (golint)
    • Line 169: warning: exported var MockConfig should have comment or be unexported (golint)
    • eth-contract-watcher/pkg/constants/interface.go
    • Line 26: warning: comment on exported var AddrChangeInterface should be of the form "AddrChangeInterface ..." (golint)
    • Line 28: warning: exported var ContentChangeInterface should have comment or be unexported (golint)
    • Line 29: warning: exported var NameChangeInterface should have comment or be unexported (golint)
    • Line 30: warning: exported var AbiChangeInterface should have comment or be unexported (golint)
    • Line 31: warning: exported var PubkeyChangeInterface should have comment or be unexported (golint)
    • Line 32: warning: exported var TextChangeInterface should have comment or be unexported (golint)
    • Line 33: warning: exported var MultihashChangeInterface should have comment or be unexported (golint)
    • Line 34: warning: exported var ContenthashChangeInterface should have comment or be unexported (golint)
    • Line 36: warning: comment on exported type Interface should be of the form "Interface ..." (with optional leading article) (golint)
    • eth-contract-watcher/pkg/fakes/mock_header_sync_block_retriever.go
    • Line 3: warning: exported type MockHeaderSyncBlockRetriever should have comment or be unexported (golint)
    • Line 8: warning: exported method MockHeaderSyncBlockRetriever.RetrieveFirstBlock should have comment or be unexported (golint)
    • Line 12: warning: exported method MockHeaderSyncBlockRetriever.RetrieveMostRecentBlock should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!