Preparing report...

Report for github.com/getamis/eth-indexer

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


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.


golint44%

Golint is a linter for Go source code.

    • eth-indexer/store/sqldb/db.go
    • Line 32: warning: exported const NullDateTime should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported var NullTime should have comment or be unexported (golint)
    • Line 42: warning: exported type QueryParameters should have comment or be unexported (golint)
    • Line 93: warning: exported function SimpleConnect should have comment or be unexported (golint)
    • Line 175: warning: exported function ToTimeStr should have comment or be unexported (golint)
    • Line 179: warning: exported function Hex should have comment or be unexported (golint)
    • Line 183: warning: exported function InClauseForBytes should have comment or be unexported (golint)
    • eth-indexer/store/block_header/options.go
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 19: warning: exported type Middleware should have comment or be unexported (golint)
    • Line 21: warning: exported type Option should have comment or be unexported (golint)
    • Line 23: warning: exported type Options should have comment or be unexported (golint)
    • eth-indexer/cmd/flags/flags.go
    • Line 20: warning: comment on exported const Host should be of the form "Host ..." (golint)
    • Line 22: warning: exported const Port should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: comment on exported const Eth should be of the form "Eth ..." (golint)
    • Line 26: warning: comment on exported const ConsulURL should be of the form "ConsulURL ..." (golint)
    • Line 30: warning: comment on exported const DbHost should be of the form "DbHost ..." (golint)
    • Line 41: warning: comment on exported const SyncFromBlock should be of the form "SyncFromBlock ..." (golint)
    • Line 44: warning: comment on exported const MetricsHost should be of the form "MetricsHost ..." (golint)
    • Line 48: warning: comment on exported const PprofEnable should be of the form "PprofEnable ..." (golint)
    • Line 53: warning: comment on exported const SubscribeErc20token should be of the form "SubscribeErc20token ..." (golint)
    • Line 56: warning: comment on exported const Chain should be of the form "Chain ..." (golint)
    • Line 59: warning: comment on exported const VaultHost should be of the form "VaultHost ..." (golint)
    • Line 63: warning: comment on exported const MetricsHostFlag should be of the form "MetricsHostFlag ..." (golint)
    • eth-indexer/model/types.go
    • Line 44: warning: comment on exported var MaxUncles should be of the form "MaxUncles ..." (golint)
    • Line 50: warning: exported var ErrConfusedUncles should have comment or be unexported (golint)
    • eth-indexer/common/chain.go
    • Line 37: warning: exported var ErrUnknownChain should have comment or be unexported (golint)
    • Line 39: warning: exported function GetChain should have comment or be unexported (golint)
    • eth-indexer/store/reorg/reorg.go
    • Line 25: warning: should not use dot imports (golint)
    • Line 28: warning: comment on exported type Store should be of the form "Store ..." (with optional leading article) (golint)
    • Line 44: warning: exported function NewWithDB should have comment or be unexported (golint)
    • eth-indexer/client/client.go
    • Line 37: warning: exported var ErrInvalidTDFormat should have comment or be unexported (golint)
    • Line 40: warning: comment on exported type EthClient should be of the form "EthClient ..." (with optional leading article) (golint)
    • Line 65: warning: exported function NewClient should have comment or be unexported (golint)
    • eth-indexer/cmd/indexer/init.go
    • Line 38: warning: exported function NewEthConn should have comment or be unexported (golint)
    • Line 48: warning: exported function NewDatabase should have comment or be unexported (golint)
    • Line 70: warning: exported function MustNewVaultClient should have comment or be unexported (golint)
    • Line 90: warning: exported function MetricsDefaultHttpServer should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign86%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!