Preparing report...

Report for github.com/dutchcoders/marija

A    Great!    Found 38 issues across 42 files

Tweet

gofmt92%

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


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!


gocyclo88%

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.


golint9%

Golint is a linter for Go source code.

    • marija/server/datasources/censys/censys.go
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • Line 28: warning: exported type Config should have comment or be unexported (golint)
    • Line 35: warning: exported type Censys should have comment or be unexported (golint)
    • Line 39: warning: exported method Config.UnmarshalTOML should have comment or be unexported (golint)
    • Line 57: warning: exported method Censys.Type should have comment or be unexported (golint)
    • Line 61: warning: exported method Censys.Search should have comment or be unexported (golint)
    • Line 61: warning: receiver name b should be consistent with previous receiver name m for Censys (golint)
    • Line 123: warning: exported method Censys.GetFields should have comment or be unexported (golint)
    • Line 123: warning: receiver name i should be consistent with previous receiver name m for Censys (golint)
    • marija/server/datasources/solr/solr.go
    • Line 15: warning: exported type Response should have comment or be unexported (golint)
    • Line 48: warning: exported type Solr should have comment or be unexported (golint)
    • Line 55: warning: exported method Solr.UnmarshalTOML should have comment or be unexported (golint)
    • Line 109: warning: exported method Solr.Search should have comment or be unexported (golint)
    • Line 109: warning: receiver name i should be consistent with previous receiver name m for Solr (golint)
    • Line 202: warning: exported method Solr.Fields should have comment or be unexported (golint)
    • Line 202: warning: receiver name i should be consistent with previous receiver name m for Solr (golint)
    • marija/server/conn.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • marija/server/datasources/tronscan/tronscan.go
    • Line 22: warning: exported function New should have comment or be unexported (golint)
    • Line 32: warning: exported type Config should have comment or be unexported (golint)
    • Line 36: warning: exported type Response should have comment or be unexported (golint)
    • Line 53: warning: exported type Tronscan should have comment or be unexported (golint)
    • Line 57: warning: exported method Config.UnmarshalTOML should have comment or be unexported (golint)
    • Line 65: warning: exported method Tronscan.Type should have comment or be unexported (golint)
    • Line 69: warning: exported method Tronscan.Search should have comment or be unexported (golint)
    • Line 69: warning: receiver name b should be consistent with previous receiver name m for Tronscan (golint)
    • Line 182: warning: exported method Tronscan.GetFields should have comment or be unexported (golint)
    • Line 182: warning: receiver name i should be consistent with previous receiver name m for Tronscan (golint)
    • marija/server/datasources/splunk/client.go
    • Line 16: warning: exported var ErrNoContent should have comment or be unexported (golint)
    • Line 21: warning: exported type JobResponse should have comment or be unexported (golint)
    • Line 25: warning: exported type SummaryResponse should have comment or be unexported (golint)
    • Line 33: warning: exported type ResultsResponse should have comment or be unexported (golint)
    • Line 46: warning: exported type Client should have comment or be unexported (golint)
    • Line 55: warning: exported function NewSplunkClient should have comment or be unexported (golint)
    • Line 68: warning: exported method Client.NewRequest should have comment or be unexported (golint)
    • Line 86: warning: exported method Client.Do should have comment or be unexported (golint)
    • marija/server/server.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 16: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 36: warning: exported type Server should have comment or be unexported (golint)
    • Line 42: warning: exported function New should have comment or be unexported (golint)
    • Line 56: warning: exported function IsTerminal should have comment or be unexported (golint)
    • Line 66: warning: exported method Server.Run should have comment or be unexported (golint)
    • Line 172: warning: exported method Server.GetDatasource should have comment or be unexported (golint)
    • Line 172: warning: receiver name s should be consistent with previous receiver name server for Server (golint)
    • marija/server/datasources/twitter/twitter_tweets.go
    • Line 19: warning: exported function NewTweets should have comment or be unexported (golint)
    • Line 38: warning: exported method TwitterTweets.Type should have comment or be unexported (golint)
    • Line 42: warning: exported type TwitterTweets should have comment or be unexported (golint)
    • Line 49: warning: exported method TwitterTweets.UnmarshalTOML should have comment or be unexported (golint)
    • Line 79: warning: exported method TwitterTweets.Search should have comment or be unexported (golint)
    • Line 79: warning: receiver name i should be consistent with previous receiver name m for TwitterTweets (golint)
    • Line 153: warning: exported method TwitterTweets.GetFields should have comment or be unexported (golint)
    • Line 153: warning: receiver name i should be consistent with previous receiver name m for TwitterTweets (golint)
    • marija/server/messages/messages.go
    • Line 5: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 11: warning: exported const ERROR should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported type Datasource should have comment or be unexported (golint)
    • Line 38: warning: exported type InitialStateMessage should have comment or be unexported (golint)
    • Line 44: warning: exported method InitialStateMessage.MarshalJSON should have comment or be unexported (golint)
    • Line 58: warning: exported type Request should have comment or be unexported (golint)
    • Line 63: warning: exported type Response should have comment or be unexported (golint)
    • Line 67: warning: exported type ItemsRequest should have comment or be unexported (golint)
    • Line 73: warning: exported type ItemsResponse should have comment or be unexported (golint)
    • Line 81: warning: exported method ItemsResponse.MarshalJSON should have comment or be unexported (golint)
    • Line 95: warning: exported type SearchRequest should have comment or be unexported (golint)
    • Line 105: warning: exported type RequestCanceled should have comment or be unexported (golint)
    • Line 109: warning: exported method RequestCanceled.MarshalJSON should have comment or be unexported (golint)
    • Line 119: warning: exported type RequestCompleted should have comment or be unexported (golint)
    • Line 123: warning: exported method RequestCompleted.MarshalJSON should have comment or be unexported (golint)
    • Line 133: warning: exported type LiveResponse should have comment or be unexported (golint)
    • Line 138: warning: exported method LiveResponse.MarshalJSON should have comment or be unexported (golint)
    • Line 150: warning: exported type SearchResponse should have comment or be unexported (golint)
    • Line 158: warning: exported method SearchResponse.MarshalJSON should have comment or be unexported (golint)
    • Line 174: warning: exported type GetFieldsRequest should have comment or be unexported (golint)
    • Line 180: warning: exported type GetFieldsResponse should have comment or be unexported (golint)
    • Line 188: warning: exported method GetFieldsResponse.MarshalJSON should have comment or be unexported (golint)
    • Line 202: warning: exported type ErrorMessage should have comment or be unexported (golint)
    • Line 207: warning: exported method ErrorMessage.MarshalJSON should have comment or be unexported (golint)
    • marija/server/unique/unique.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 10: warning: exported type Unique should have comment or be unexported (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 18: warning: exported method Unique.Get should have comment or be unexported (golint)
    • Line 27: warning: exported method Unique.Add should have comment or be unexported (golint)
    • marija/server/datasources/splunk/splunk.go
    • Line 23: warning: exported function New should have comment or be unexported (golint)
    • Line 44: warning: exported type Config should have comment or be unexported (golint)
    • Line 53: warning: exported type Splunk should have comment or be unexported (golint)
    • Line 59: warning: exported method Splunk.Type should have comment or be unexported (golint)
    • Line 63: warning: exported method Splunk.UnmarshalTOML should have comment or be unexported (golint)
    • Line 98: warning: exported method Splunk.Search should have comment or be unexported (golint)
    • Line 98: warning: receiver name i should be consistent with previous receiver name m for Splunk (golint)
    • Line 257: warning: exported method Splunk.GetFields should have comment or be unexported (golint)
    • Line 257: warning: receiver name i should be consistent with previous receiver name m for Splunk (golint)
    • Line 299: warning: should omit 2nd value from range; this loop is equivalent to `for name := range ...` (golint)
    • marija/server/datasources/blockchain/blockchain.go
    • Line 23: warning: exported function New should have comment or be unexported (golint)
    • Line 35: warning: exported method BTC.Type should have comment or be unexported (golint)
    • Line 39: warning: exported type Config should have comment or be unexported (golint)
    • Line 42: warning: exported method BTC.UnmarshalTOML should have comment or be unexported (golint)
    • Line 49: warning: exported type BTC should have comment or be unexported (golint)
    • Line 57: warning: exported method BTC.Search should have comment or be unexported (golint)
    • Line 57: warning: receiver name b should be consistent with previous receiver name m for BTC (golint)
    • Line 174: warning: exported method BTC.GetFields should have comment or be unexported (golint)
    • Line 174: warning: receiver name i should be consistent with previous receiver name m for BTC (golint)
    • marija/server/datasources/live/live.go
    • Line 22: warning: exported function New should have comment or be unexported (golint)
    • Line 34: warning: exported method Live.Receive should have comment or be unexported (golint)
    • Line 38: warning: exported method Live.Broadcast should have comment or be unexported (golint)
    • Line 98: warning: exported type Live should have comment or be unexported (golint)
    • Line 102: warning: exported method Live.Type should have comment or be unexported (golint)
    • Line 102: warning: receiver name m should be consistent with previous receiver name l for Live (golint)
    • Line 106: warning: exported method Live.UnmarshalTOML should have comment or be unexported (golint)
    • Line 106: warning: receiver name m should be consistent with previous receiver name l for Live (golint)
    • Line 110: warning: exported method Live.Search should have comment or be unexported (golint)
    • Line 110: warning: receiver name i should be consistent with previous receiver name l for Live (golint)
    • Line 120: warning: exported method Live.GetFields should have comment or be unexported (golint)
    • Line 120: warning: receiver name i should be consistent with previous receiver name l for Live (golint)
    • marija/server/datasources/datasources.go
    • Line 12: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 15: warning: exported type DatasourceFn should have comment or be unexported (golint)
    • Line 17: warning: exported function Register should have comment or be unexported (golint)
    • Line 22: warning: exported function Get should have comment or be unexported (golint)
    • Line 30: warning: exported function WithConfig should have comment or be unexported (golint)
    • Line 37: warning: exported type AdvancedQuery should have comment or be unexported (golint)
    • marija/cmd/cmd.go
    • Line 12: warning: exported var Version should have comment or be unexported (golint)
    • Line 52: warning: exported type Cmd should have comment or be unexported (golint)
    • Line 56: warning: exported function VersionAction should have comment or be unexported (golint)
    • Line 60: warning: exported function New should have comment or be unexported (golint)
    • marija/server/cache.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 10: warning: exported type ItemCache should have comment or be unexported (golint)
    • Line 14: warning: exported method ItemCache.Store should have comment or be unexported (golint)
    • Line 18: warning: exported method ItemCache.LoadOrStore should have comment or be unexported (golint)
    • Line 18: warning: receiver name is should be consistent with previous receiver name ic for ItemCache (golint)
    • Line 27: warning: exported method ItemCache.Load should have comment or be unexported (golint)
    • Line 27: warning: receiver name is should be consistent with previous receiver name ic for ItemCache (golint)
    • marija/server/options.go
    • Line 5: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 12: warning: exported function WithDebug should have comment or be unexported (golint)
    • Line 18: warning: exported function WithConfig should have comment or be unexported (golint)
    • Line 61: warning: exported function WithPath should have comment or be unexported (golint)
    • Line 67: warning: exported function WithAddress should have comment or be unexported (golint)
    • marija/server/datasources/index.go
    • Line 5: warning: exported type Index should have comment or be unexported (golint)
    • Line 13: warning: exported type SetNamerer should have comment or be unexported (golint)
    • Line 17: warning: exported type SetHuberer should have comment or be unexported (golint)
    • marija/server/datasources/twitter/twitter_friends.go
    • Line 16: warning: exported function NewFriends should have comment or be unexported (golint)
    • Line 35: warning: exported method TwitterFriends.Type should have comment or be unexported (golint)
    • Line 39: warning: exported type TwitterFriends should have comment or be unexported (golint)
    • Line 46: warning: exported method TwitterFriends.UnmarshalTOML should have comment or be unexported (golint)
    • Line 76: warning: exported method TwitterFriends.Search should have comment or be unexported (golint)
    • Line 76: warning: receiver name i should be consistent with previous receiver name m for TwitterFriends (golint)
    • Line 131: warning: exported method TwitterFriends.GetFields should have comment or be unexported (golint)
    • Line 131: warning: receiver name i should be consistent with previous receiver name m for TwitterFriends (golint)
    • marija/server/datasources/openkvk/openkvk.go
    • Line 22: warning: exported function New should have comment or be unexported (golint)
    • Line 32: warning: exported type Config should have comment or be unexported (golint)
    • Line 38: warning: exported type Response should have comment or be unexported (golint)
    • Line 89: warning: exported type OpenKvK should have comment or be unexported (golint)
    • Line 93: warning: exported method Config.UnmarshalTOML should have comment or be unexported (golint)
    • Line 105: warning: exported method OpenKvK.Type should have comment or be unexported (golint)
    • Line 109: warning: exported method OpenKvK.Search should have comment or be unexported (golint)
    • Line 109: warning: receiver name b should be consistent with previous receiver name m for OpenKvK (golint)
    • Line 267: warning: exported method OpenKvK.GetFields should have comment or be unexported (golint)
    • Line 267: warning: receiver name i should be consistent with previous receiver name m for OpenKvK (golint)
    • marija/server/datasources/voertuiggegevens/voertuiggegevens.go
    • Line 22: warning: exported function New should have comment or be unexported (golint)
    • Line 32: warning: exported type Config should have comment or be unexported (golint)
    • Line 38: warning: exported type Response should have comment or be unexported (golint)
    • Line 72: warning: exported type VoertuigGegevens should have comment or be unexported (golint)
    • Line 76: warning: exported method Config.UnmarshalTOML should have comment or be unexported (golint)
    • Line 88: warning: exported method VoertuigGegevens.Type should have comment or be unexported (golint)
    • Line 92: warning: exported method VoertuigGegevens.Search should have comment or be unexported (golint)
    • Line 92: warning: receiver name b should be consistent with previous receiver name m for VoertuigGegevens (golint)
    • Line 231: warning: exported method VoertuigGegevens.GetFields should have comment or be unexported (golint)
    • Line 231: warning: receiver name i should be consistent with previous receiver name m for VoertuigGegevens (golint)
    • marija/server/datasources/censys/api/driver.go
    • Line 157: warning: exported type SearchOutput should have comment or be unexported (golint)
    • Line 169: warning: exported type ViewOutput should have comment or be unexported (golint)
    • Line 178: warning: exported type SearchOption should have comment or be unexported (golint)
    • Line 180: warning: exported function Page should have comment or be unexported (golint)
    • Line 187: warning: exported function Field should have comment or be unexported (golint)
    • Line 194: warning: exported function Query should have comment or be unexported (golint)
    • Line 352: warning: exported function New should have comment or be unexported (golint)
    • Line 382: warning: receiver name wd should be consistent with previous receiver name c for client (golint)
    • marija/server/datasources/twitter/twitter_followers.go
    • Line 16: warning: exported function NewFollowers should have comment or be unexported (golint)
    • Line 35: warning: exported method TwitterFollowers.Type should have comment or be unexported (golint)
    • Line 39: warning: exported type TwitterFollowers should have comment or be unexported (golint)
    • Line 46: warning: exported method TwitterFollowers.UnmarshalTOML should have comment or be unexported (golint)
    • Line 76: warning: exported method TwitterFollowers.Search should have comment or be unexported (golint)
    • Line 76: warning: receiver name i should be consistent with previous receiver name m for TwitterFollowers (golint)
    • Line 131: warning: exported method TwitterFollowers.GetFields should have comment or be unexported (golint)
    • Line 131: warning: receiver name i should be consistent with previous receiver name m for TwitterFollowers (golint)
    • marija/server/datasources/es5/elasticsearchindexv5.go
    • Line 32: warning: exported type ElasticLogger should have comment or be unexported (golint)
    • Line 36: warning: exported method ElasticLogger.Printf should have comment or be unexported (golint)
    • Line 40: warning: exported function New should have comment or be unexported (golint)
    • Line 65: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 72: warning: exported method Elasticsearch.Type should have comment or be unexported (golint)
    • Line 76: warning: exported type Config should have comment or be unexported (golint)
    • Line 87: warning: exported type Elasticsearch should have comment or be unexported (golint)
    • Line 94: warning: exported method Elasticsearch.UnmarshalTOML should have comment or be unexported (golint)
    • Line 136: warning: exported method Elasticsearch.Search should have comment or be unexported (golint)
    • Line 136: warning: receiver name i should be consistent with previous receiver name m for Elasticsearch (golint)
    • Line 313: warning: exported method Elasticsearch.GetFields should have comment or be unexported (golint)
    • Line 313: warning: receiver name i should be consistent with previous receiver name m for Elasticsearch (golint)
    • Line 322: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words

    • marija/server/conn.go
    • Line 131: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 138: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 148: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 154: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 164: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 170: warning: "occured" is a misspelling of "occurred" (misspell)