Preparing report...

Report for github.com/planetdecred/pdanalytics

A    Great!    Found 64 issues across 99 files

Tweet

gofmt96%

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!


gocyclo80%

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.

    • pdanalytics/commstats/handlers.go
    • Line 131: warning: cyclomatic complexity 16 of function (*Collector).getCommunityStat() is high (> 15) (gocyclo)
    • Line 26: warning: cyclomatic complexity 16 of function (*Collector).community() is high (> 15) (gocyclo)
    • pdanalytics/postgres/vsp.go
    • Line 547: warning: cyclomatic complexity 32 of function (*PgDb).FetchEncodeBinVspChart() is high (> 15) (gocyclo)
    • Line 957: warning: cyclomatic complexity 25 of function (*PgDb).UpdateVspDailyChart() is high (> 15) (gocyclo)
    • Line 854: warning: cyclomatic complexity 24 of function (*PgDb).UpdateVspHourlyChart() is high (> 15) (gocyclo)
    • Line 471: warning: cyclomatic complexity 21 of function (*PgDb).FetchEncodeVspChart() is high (> 15) (gocyclo)
    • pdanalytics/postgres/propagation.go
    • Line 878: warning: cyclomatic complexity 20 of function (*PgDb).updateVoteTimeDeviationDailyAvgData() is high (> 15) (gocyclo)
    • Line 774: warning: cyclomatic complexity 20 of function (*PgDb).updateVoteTimeDeviationHourlyAvgData() is high (> 15) (gocyclo)
    • Line 479: warning: cyclomatic complexity 18 of function (*PgDb).UpdatePropagationDailyAvgForSource() is high (> 15) (gocyclo)
    • Line 369: warning: cyclomatic complexity 18 of function (*PgDb).UpdatePropagationHourlyAvgForSource() is high (> 15) (gocyclo)
    • Line 679: warning: cyclomatic complexity 16 of function (*PgDb).updateBlockDailyAvgData() is high (> 15) (gocyclo)
    • Line 596: warning: cyclomatic complexity 16 of function (*PgDb).updateBlockHourlyAvgData() is high (> 15) (gocyclo)
    • pdanalytics/postgres/pow.go
    • Line 485: warning: cyclomatic complexity 19 of function (*PgDb).updatePowHourlyAvg() is high (> 15) (gocyclo)
    • Line 568: warning: cyclomatic complexity 19 of function (*PgDb).updatePowDailyAvg() is high (> 15) (gocyclo)
    • Line 347: warning: cyclomatic complexity 16 of function (*PgDb).FetchEncodePowChart() is high (> 15) (gocyclo)
    • pdanalytics/postgres/network_snapshot.go
    • Line 1279: warning: cyclomatic complexity 26 of function (*PgDb).updateNodeLocationBinData() is high (> 15) (gocyclo)
    • Line 1094: warning: cyclomatic complexity 26 of function (*PgDb).updateSnapshotVersionBinData() is high (> 15) (gocyclo)
    • Line 817: warning: cyclomatic complexity 25 of function (*PgDb).UpdateSnapshotNodesBin() is high (> 15) (gocyclo)

golint43%

Golint is a linter for Go source code.

    • pdanalytics/attackcost/attackcost.go
    • Line 17: warning: exported type Attackcost should have comment or be unexported (golint)
    • Line 34: warning: exported function New should have comment or be unexported (golint)
    • Line 80: warning: exported method Attackcost.ConnectBlock should have comment or be unexported (golint)
    • pdanalytics/vsp/vsp.go
    • Line 24: warning: exported function Activate should have comment or be unexported (golint)
    • Line 71: warning: exported method Collector.Run should have comment or be unexported (golint)
    • pdanalytics/web/server.go
    • Line 16: warning: exported const DarkModeCoookie should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: comment on exported const DefaultErrorCode should be of the form "DefaultErrorCode ..." (golint)
    • Line 27: warning: exported var ExplorerLinks should have comment or be unexported (golint)
    • Line 55: warning: exported method ExpStatus.IsNotFound should have comment or be unexported (golint)
    • Line 59: warning: exported method ExpStatus.IsWrongNet should have comment or be unexported (golint)
    • Line 63: warning: exported method ExpStatus.IsP2PKAddress should have comment or be unexported (golint)
    • Line 67: warning: exported method ExpStatus.IsFutureBlock should have comment or be unexported (golint)
    • Line 71: warning: exported method ExpStatus.IsSyncing should have comment or be unexported (golint)
    • Line 75: warning: comment on exported function NewServer should be of the form "NewServer ..." (golint)
    • Line 113: warning: comment on exported method Server.MountAssetPaths should be of the form "MountAssetPaths ..." (golint)
    • Line 133: warning: exported method Server.AddMenuItem should have comment or be unexported (golint)
    • pdanalytics/propagation/types.go
    • Line 29: warning: exported type Store should have comment or be unexported (golint)
    • Line 56: warning: exported type Dto should have comment or be unexported (golint)
    • Line 68: warning: exported type Block should have comment or be unexported (golint)
    • Line 75: warning: exported type BlockDto should have comment or be unexported (golint)
    • Line 84: warning: comment on exported type BlockBinDto should be of the form "BlockBinDto ..." (with optional leading article) (golint)
    • Line 91: warning: exported type PropagationChartData should have comment or be unexported (golint)
    • Line 104: warning: exported type BlockReceiveTime should have comment or be unexported (golint)
    • Line 109: warning: exported type Vote should have comment or be unexported (golint)
    • Line 127: warning: exported type VoteDto should have comment or be unexported (golint)
    • pdanalytics/netsnapshot/types.go
    • Line 13: warning: exported type SnapShot should have comment or be unexported (golint)
    • Line 23: warning: exported type NodeCount should have comment or be unexported (golint)
    • Line 28: warning: exported type UserAgentInfo should have comment or be unexported (golint)
    • Line 35: warning: exported type CountryInfo should have comment or be unexported (golint)
    • Line 42: warning: exported type NetworkPeer should have comment or be unexported (golint)
    • Line 62: warning: exported type Heartbeat should have comment or be unexported (golint)
    • Line 70: warning: exported type IPInfo should have comment or be unexported (golint)
    • Line 80: warning: exported type DataStore should have comment or be unexported (golint)
    • Line 119: warning: exported type Node should have comment or be unexported (golint)
    • Line 147: warning: exported type Manager should have comment or be unexported (golint)
    • Line 159: warning: exported type NetworkSnapshotOptions should have comment or be unexported (golint)
    • pdanalytics/web/types.go
    • Line 16: warning: exported type Server should have comment or be unexported (golint)
    • Line 43: warning: exported type MenuItem should have comment or be unexported (golint)
    • Line 51: warning: exported const MainNavGroup should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported type NavGroup should have comment or be unexported (golint)
    • Line 60: warning: exported type BreadcrumbItem should have comment or be unexported (golint)
    • Line 100: warning: exported method TimeDef.Format should have comment or be unexported (golint)
    • Line 145: warning: exported type BlockBasic should have comment or be unexported (golint)
    • Line 267: warning: exported type PageData should have comment or be unexported (golint)
    • pdanalytics/dbhelper/helpers.go
    • Line 14: warning: exported var CtxDeadlineExceeded should have comment or be unexported (golint)
    • Line 18: warning: exported const DateTemplate should have comment or be unexported (golint)
    • Line 19: warning: exported const DateMiliTemplate should have comment or be unexported (golint)
    • Line 21: warning: exported function TableExists should have comment or be unexported (golint)
    • Line 34: warning: exported function DropTable should have comment or be unexported (golint)
    • pdanalytics/exchanges/exchanges.go
    • Line 24: warning: exported type TickHub should have comment or be unexported (golint)
    • Line 41: warning: exported function Activate should have comment or be unexported (golint)
    • Line 88: warning: exported method TickHub.CollectShort should have comment or be unexported (golint)
    • Line 108: warning: exported method TickHub.CollectLong should have comment or be unexported (golint)
    • Line 128: warning: exported method TickHub.CollectHistoric should have comment or be unexported (golint)
    • Line 148: warning: exported method TickHub.CollectAll should have comment or be unexported (golint)
    • Line 172: warning: exported method TickHub.Run should have comment or be unexported (golint)
    • pdanalytics/pow/types.go
    • Line 5: warning: exported type PowDataSource should have comment or be unexported (golint)
    • Line 9: warning: exported type PowData should have comment or be unexported (golint)
    • Line 18: warning: exported type PowDataDto should have comment or be unexported (golint)
    • Line 27: warning: exported type PowChartData should have comment or be unexported (golint)
    • pdanalytics/postgres/helpers.go
    • Line 29: warning: exported function UnixTimeToString should have comment or be unexported (golint)
    • Line 33: warning: exported function RoundValue should have comment or be unexported (golint)
    • Line 72: warning: exported method PgDb.LastEntry should have comment or be unexported (golint)
    • pdanalytics/exchanges/ticks/collectors.go
    • Line 17: warning: exported const Bittrex should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported var CollectorConstructors should have comment or be unexported (golint)
    • Line 223: warning: exported function NewPoloniexCollector should have comment or be unexported (golint)
    • Line 227: warning: exported function NewBittrexCollector should have comment or be unexported (golint)
    • Line 231: warning: exported function NewBittrexUSDCollector should have comment or be unexported (golint)
    • Line 235: warning: exported function NewBinanceCollector should have comment or be unexported (golint)
    • pdanalytics/mempool/mempool.go
    • Line 16: warning: exported function NewCollector should have comment or be unexported (golint)
    • Line 49: warning: exported method Collector.StartMonitoring should have comment or be unexported (golint)
    • pdanalytics/propagation/handler.go
    • Line 19: warning: comment on exported const BlockPropagation should be of the form "BlockPropagation ..." (golint)
    • Line 21: warning: exported const BlockTimestamp should have comment (or a comment on this block) or be unexported (golint)
    • Line 437: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 496: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pdanalytics/postgres/proposal.go
    • Line 20: warning: exported const IndexProposalsTableOnToken should have comment (or a comment on this block) or be unexported (golint)
    • Line 80: warning: exported method PgDb.RetrieveLastCommitTime should have comment or be unexported (golint)
    • Line 114: warning: comment on exported method PgDb.RetrieveProposalVotesData should be of the form "RetrieveProposalVotesData ..." (golint)
    • pdanalytics/web/response.go
    • Line 11: warning: exported function RenderErrorfJSON should have comment or be unexported (golint)
    • Line 19: warning: exported function RenderJSON should have comment or be unexported (golint)
    • pdanalytics/exchanges/ticks/types.go
    • Line 15: warning: exported type Collector should have comment or be unexported (golint)
    • Line 21: warning: exported type Store should have comment or be unexported (golint)
    • Line 43: warning: exported type ExchangeData should have comment or be unexported (golint)
    • Line 55: warning: exported type ExchangeDto should have comment or be unexported (golint)
    • Line 104: warning: comment on exported type TickChartData should be of the form "TickChartData ..." (with optional leading article) (golint)
    • Line 110: warning: exported type TickDtoCP should have comment or be unexported (golint)
    • Line 114: warning: exported type TickDtoInterval should have comment or be unexported (golint)
    • pdanalytics/netsnapshot/manager.go
    • Line 96: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 130: warning: exported method Manager.AddAddresses should have comment or be unexported (golint)
    • Line 211: warning: exported method Manager.Attempt should have comment or be unexported (golint)
    • Line 228: warning: exported method Manager.Good should have comment or be unexported (golint)
    • pdanalytics/postgres/mempool.go
    • Line 20: warning: comment on exported const MempoolSize should be of the form "MempoolSize ..." (golint)
    • Line 22: warning: exported const MempoolFees should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported method PgDb.MempoolTableName should have comment or be unexported (golint)
    • Line 33: warning: exported method PgDb.StoreMempool should have comment or be unexported (golint)
    • Line 64: warning: exported method PgDb.LastMempoolBlockHeight should have comment or be unexported (golint)
    • Line 70: warning: exported method PgDb.LastMempoolTime should have comment or be unexported (golint)
    • Line 79: warning: exported method PgDb.MempoolCount should have comment or be unexported (golint)
    • Line 83: warning: exported method PgDb.Mempools should have comment or be unexported (golint)
    • Line 105: warning: exported method PgDb.UpdateMempoolAggregateData should have comment or be unexported (golint)
    • Line 307: warning: exported method PgDb.FetchEncodeChart should have comment or be unexported (golint)
    • pdanalytics/postgres/commstat.go
    • Line 50: warning: exported method PgDb.StoreRedditStat should have comment or be unexported (golint)
    • Line 68: warning: exported method PgDb.LastCommStatEntry should have comment or be unexported (golint)
    • Line 74: warning: exported method PgDb.CountRedditStat should have comment or be unexported (golint)
    • Line 78: warning: exported method PgDb.RedditStats should have comment or be unexported (golint)
    • Line 100: warning: comment on exported method PgDb.StoreTwitterStat should be of the form "StoreTwitterStat ..." (golint)
    • Line 118: warning: exported method PgDb.CountTwitterStat should have comment or be unexported (golint)
    • Line 122: warning: exported method PgDb.TwitterStats should have comment or be unexported (golint)
    • Line 143: warning: comment on exported method PgDb.StoreYoutubeStat should be of the form "StoreYoutubeStat ..." (golint)
    • Line 162: warning: exported method PgDb.CountYoutubeStat should have comment or be unexported (golint)
    • Line 166: warning: exported method PgDb.YoutubeStat should have comment or be unexported (golint)
    • Line 189: warning: comment on exported method PgDb.StoreGithubStat should be of the form "StoreGithubStat ..." (golint)
    • Line 208: warning: exported method PgDb.CountGithubStat should have comment or be unexported (golint)
    • Line 212: warning: exported method PgDb.GithubStat should have comment or be unexported (golint)
    • Line 234: warning: exported method PgDb.CommunityChart should have comment or be unexported (golint)
    • pdanalytics/web/routes.go
    • Line 14: warning: exported const GET should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported method Server.AddRoute should have comment or be unexported (golint)
    • Line 54: warning: exported method Server.RouteGroup should have comment or be unexported (golint)
    • Line 62: warning: exported method Server.BuildRoute should have comment or be unexported (golint)
    • pdanalytics/web/templates.go
    • Line 25: warning: exported const TestnetNetName should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported type Templates should have comment or be unexported (golint)
    • Line 97: warning: exported method Templates.AddTemplate should have comment or be unexported (golint)
    • Line 110: warning: exported method Templates.ReloadTemplates should have comment or be unexported (golint)
    • Line 523: warning: exported function FormattedDuration should have comment or be unexported (golint)
    • pdanalytics/mempool/handlers.go
    • Line 55: warning: receiver name s should be consistent with previous receiver name c for Collector (golint)
    • Line 66: warning: receiver name s should be consistent with previous receiver name c for Collector (golint)
    • pdanalytics/postgres/exchange.go
    • Line 47: warning: exported var ErrNonConsecutiveTicks should have comment or be unexported (golint)
    • Line 51: warning: exported method PgDb.ExchangeTableName should have comment or be unexported (golint)
    • Line 55: warning: exported method PgDb.ExchangeTickTableName should have comment or be unexported (golint)
    • Line 59: warning: exported method PgDb.RegisterExchange should have comment or be unexported (golint)
    • Line 96: warning: comment on exported method PgDb.StoreExchangeTicks should be of the form "StoreExchangeTicks ..." (golint)
    • Line 151: warning: exported method PgDb.SaveExchangeFromSync should have comment or be unexported (golint)
    • Line 186: warning: exported method PgDb.FetchExchangeForSync should have comment or be unexported (golint)
    • Line 208: warning: exported method PgDb.ExchangeTickCount should have comment or be unexported (golint)
    • Line 269: warning: comment on exported method PgDb.AllExchangeTicks should be of the form "AllExchangeTicks ..." (golint)
    • Line 315: warning: exported method PgDb.AllExchangeTicksCurrencyPair should have comment or be unexported (golint)
    • Line 331: warning: exported method PgDb.CurrencyPairByExchange should have comment or be unexported (golint)
    • Line 357: warning: exported method PgDb.AllExchangeTicksInterval should have comment or be unexported (golint)
    • Line 373: warning: exported method PgDb.TickIntervalsByExchangeAndPair should have comment or be unexported (golint)
    • Line 402: warning: exported method PgDb.ExchangeTicksChartData should have comment or be unexported (golint)
    • Line 479: warning: exported method PgDb.SaveExchangeTickFromSync should have comment or be unexported (golint)
    • Line 517: warning: comment on exported method PgDb.LastExchangeTickEntryTime should be of the form "LastExchangeTickEntryTime ..." (golint)
    • Line 524: warning: comment on exported method PgDb.LastExchangeEntryID should be of the form "LastExchangeEntryID ..." (golint)
    • Line 531: warning: exported method PgDb.FetchEncodeExchangeChart should have comment or be unexported (golint)
    • pdanalytics/chart/exchange.go
    • Line 10: warning: exported const ExchangeCloseAxis should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported function ExtractExchangeKey should have comment or be unexported (golint)
    • pdanalytics/postgres/setup.go
    • Line 220: warning: exported method PgDb.CreateTables should have comment or be unexported (golint)
    • Line 248: warning: exported method PgDb.TableExists should have comment or be unexported (golint)
    • Line 261: warning: exported method PgDb.DropTables should have comment or be unexported (golint)
    • pdanalytics/commstats/handlers.go
    • Line 131: warning: receiver name s should be consistent with previous receiver name c for Collector (golint)
    • Line 231: warning: receiver name s should be consistent with previous receiver name c for Collector (golint)
    • pdanalytics/postgres/vsp.go
    • Line 70: warning: error var vspTickExistsErr should have name of the form errFoo (golint)
    • Line 73: warning: exported method PgDb.VspTableName should have comment or be unexported (golint)
    • Line 77: warning: exported method PgDb.VspTickTableName should have comment or be unexported (golint)
    • Line 172: warning: exported method PgDb.FetchVSPs should have comment or be unexported (golint)
    • Line 199: warning: exported method PgDb.AddVspSourceFromSync should have comment or be unexported (golint)
    • Line 218: warning: exported method PgDb.FetchVspSourcesForSync should have comment or be unexported (golint)
    • Line 249: warning: comment on exported method PgDb.FilteredVSPTicks should be of the form "FilteredVSPTicks ..." (golint)
    • Line 291: warning: comment on exported method PgDb.AllVSPTicks should be of the form "AllVSPTicks ..." (golint)
    • Line 343: warning: exported method PgDb.LastVspTickEntryTime should have comment or be unexported (golint)
    • Line 349: warning: exported method PgDb.VspTickCount should have comment or be unexported (golint)
    • Line 471: warning: exported method PgDb.FetchEncodeVspChart should have comment or be unexported (golint)
    • Line 547: warning: exported method PgDb.FetchEncodeBinVspChart should have comment or be unexported (golint)
    • Line 842: warning: exported method PgDb.UpdateVspChart should have comment or be unexported (golint)
    • Line 854: warning: exported method PgDb.UpdateVspHourlyChart should have comment or be unexported (golint)
    • Line 957: warning: exported method PgDb.UpdateVspDailyChart should have comment or be unexported (golint)
    • pdanalytics/web/utils.go
    • Line 1: warning: package comment should be of the form "Package web ..." (golint)
    • Line 19: warning: exported const ChartViewOption should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported var PageSizeSelector should have comment or be unexported (golint)
    • Line 79: warning: exported function AddParams should have comment or be unexported (golint)
    • Line 113: warning: exported function NowUTC should have comment or be unexported (golint)
    • Line 117: warning: exported function UnixTime should have comment or be unexported (golint)
    • Line 121: warning: exported function DurationToString should have comment or be unexported (golint)
    • pdanalytics/homepage/home.go
    • Line 13: warning: exported type Home should have comment or be unexported (golint)
    • Line 18: warning: exported type Mods should have comment or be unexported (golint)
    • Line 24: warning: exported function New should have comment or be unexported (golint)
    • pdanalytics/mempool/types.go
    • Line 11: warning: exported type Mempool should have comment or be unexported (golint)
    • Line 23: warning: exported type Dto should have comment or be unexported (golint)
    • Line 35: warning: exported type DataStore should have comment or be unexported (golint)
    • Line 48: warning: exported type Collector should have comment or be unexported (golint)
    • pdanalytics/postgres/propagation.go
    • Line 21: warning: exported method PgDb.BlockTableName should have comment or be unexported (golint)
    • Line 25: warning: exported method PgDb.VoteTableName should have comment or be unexported (golint)
    • Line 29: warning: exported method PgDb.SaveBlock should have comment or be unexported (golint)
    • Line 67: warning: exported method PgDb.BlockCount should have comment or be unexported (golint)
    • Line 71: warning: exported method PgDb.Blocks should have comment or be unexported (golint)
    • Line 102: warning: exported method PgDb.BlocksWithoutVotes should have comment or be unexported (golint)
    • Line 134: warning: exported method PgDb.SaveVote should have comment or be unexported (golint)
    • Line 164: warning: exported method PgDb.Votes should have comment or be unexported (golint)
    • Line 178: warning: exported method PgDb.VotesByBlock should have comment or be unexported (golint)
    • Line 231: warning: exported method PgDb.VotesCount should have comment or be unexported (golint)
    • Line 235: warning: exported method PgDb.VotesBlockReceiveTimeDiffs should have comment or be unexported (golint)
    • Line 253: warning: exported method PgDb.BlockDelays should have comment or be unexported (golint)
    • Line 584: warning: comment on exported method PgDb.UpdateBlockBinData should be of the form "UpdateBlockBinData ..." (golint)
    • Line 762: warning: comment on exported method PgDb.UpdateVoteTimeDeviationData should be of the form "UpdateVoteTimeDeviationData ..." (golint)
    • Line 982: warning: exported method PgDb.SourceDeviations should have comment or be unexported (golint)
    • Line 1001: warning: exported method PgDb.BlockBinData should have comment or be unexported (golint)
    • Line 1019: warning: exported method PgDb.VoteReceiveTimeDeviations should have comment or be unexported (golint)
    • pdanalytics/chart/chart.go
    • Line 48: warning: exported function ParseBin should have comment or be unexported (golint)
    • Line 76: warning: comment on exported type Lengther should be of the form "Lengther ..." (with optional leading article) (golint)
    • Line 99: warning: exported method ChartFloats.IsZero should have comment or be unexported (golint)
    • Line 106: warning: exported method ChartFloats.Remove should have comment or be unexported (golint)
    • Line 121: warning: exported method ChartFloats.Normalize should have comment or be unexported (golint)
    • Line 121: warning: receiver name charts should be consistent with previous receiver name data for ChartFloats (golint)
    • Line 141: warning: exported type ChartNullData should have comment or be unexported (golint)
    • Line 259: warning: exported method ChartNullUints.Normalize should have comment or be unexported (golint)
    • Line 263: warning: exported method ChartNullUints.Value should have comment or be unexported (golint)
    • Line 292: warning: exported method ChartNullUints.Valid should have comment or be unexported (golint)
    • Line 299: warning: exported method ChartNullUints.IsZero should have comment or be unexported (golint)
    • Line 303: warning: exported method ChartNullUints.Remove should have comment or be unexported (golint)
    • Line 326: warning: comment on exported method ChartNullUints.ToChartString should be of the form "ToChartString ..." (golint)
    • Line 460: warning: exported method ChartNullFloats.Normalize should have comment or be unexported (golint)
    • Line 464: warning: exported method ChartNullFloats.Value should have comment or be unexported (golint)
    • Line 493: warning: exported method ChartNullFloats.Valid should have comment or be unexported (golint)
    • Line 500: warning: exported method ChartNullFloats.IsZero should have comment or be unexported (golint)
    • Line 504: warning: exported method ChartNullFloats.Remove should have comment or be unexported (golint)
    • Line 549: warning: exported method ChartStrings.IsZero should have comment or be unexported (golint)
    • Line 556: warning: exported method ChartStrings.Remove should have comment or be unexported (golint)
    • Line 578: warning: exported method ChartUints.IsZero should have comment or be unexported (golint)
    • Line 585: warning: exported method ChartUints.Remove should have comment or be unexported (golint)
    • Line 600: warning: exported method ChartUints.Normalize should have comment or be unexported (golint)
    • Line 629: warning: comment on exported function ValidateLengths should be of the form "ValidateLengths ..." (golint)
    • Line 843: warning: exported function MakePowChart should have comment or be unexported (golint)
    • Line 858: warning: exported function MakeVspChart should have comment or be unexported (golint)
    • pdanalytics/postgres/postgres.go
    • Line 20: warning: exported type PgDb should have comment or be unexported (golint)
    • Line 32: warning: exported function NewPgDb should have comment or be unexported (golint)
    • Line 48: warning: exported method PgDb.Close should have comment or be unexported (golint)
    • pdanalytics/web/middleware.go
    • Line 22: warning: comment on exported function ChartDataTypeCtx should be of the form "ChartDataTypeCtx ..." (golint)
    • Line 32: warning: comment on exported function GetChartDataTypeCtx should be of the form "GetChartDataTypeCtx ..." (golint)
    • pdanalytics/pow/collectors.go
    • Line 26: warning: exported type PowDataStore should have comment or be unexported (golint)
    • Line 43: warning: exported type Collector should have comment or be unexported (golint)
    • Line 50: warning: exported function Activate should have comment or be unexported (golint)
    • Line 99: warning: exported method Collector.Run should have comment or be unexported (golint)
    • Line 126: warning: exported method Collector.CollectAsync should have comment or be unexported (golint)
    • Line 154: warning: exported method Collector.Collect should have comment or be unexported (golint)
    • Line 176: warning: receiver name c should be consistent with previous receiver name pc for Collector (golint)
    • pdanalytics/postgres/pow.go
    • Line 46: warning: exported method PgDb.PowTableName should have comment or be unexported (golint)
    • Line 50: warning: exported method PgDb.LastPowEntryTime should have comment or be unexported (golint)
    • Line 68: warning: comment on exported method PgDb.AddPowData should be of the form "AddPowData ..." (golint)
    • Line 97: warning: exported method PgDb.AddPowDataFromSync should have comment or be unexported (golint)
    • Line 119: warning: exported method PgDb.PowCount should have comment or be unexported (golint)
    • Line 123: warning: exported method PgDb.FetchPowData should have comment or be unexported (golint)
    • Line 175: warning: exported method PgDb.FetchPowDataBySource should have comment or be unexported (golint)
    • Line 198: warning: exported method PgDb.GetPowDistinctDates should have comment or be unexported (golint)
    • Line 249: warning: exported method PgDb.FetchPowChartData should have comment or be unexported (golint)
    • Line 325: warning: exported method PgDb.FetchPowSourceData should have comment or be unexported (golint)
    • Line 347: warning: exported method PgDb.FetchEncodePowChart should have comment or be unexported (golint)
    • Line 403: warning: exported method PgDb.FetchPowChart should have comment or be unexported (golint)
    • Line 472: warning: exported method PgDb.UpdatePowChart should have comment or be unexported (golint)
    • pdanalytics/pow/pow.go
    • Line 17: warning: exported const Luxor should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported var PowConstructors should have comment or be unexported (golint)
    • Line 56: warning: exported type Pow should have comment or be unexported (golint)
    • Line 62: warning: exported type CommonInfo should have comment or be unexported (golint)
    • Line 68: warning: exported method CommonInfo.LastUpdateTime should have comment or be unexported (golint)
    • Line 72: warning: exported type LuxorPow should have comment or be unexported (golint)
    • Line 76: warning: exported function NewLuxor should have comment or be unexported (golint)
    • Line 89: warning: exported method LuxorPow.Collect should have comment or be unexported (golint)
    • Line 133: warning: exported method LuxorPow.Name should have comment or be unexported (golint)
    • Line 135: warning: exported type F2poolPow should have comment or be unexported (golint)
    • Line 139: warning: exported function NewF2pool should have comment or be unexported (golint)
    • Line 152: warning: exported method F2poolPow.Collect should have comment or be unexported (golint)
    • Line 187: warning: exported method F2poolPow.Name should have comment or be unexported (golint)
    • Line 189: warning: exported type CoinminePow should have comment or be unexported (golint)
    • Line 193: warning: exported function NewCoinmine should have comment or be unexported (golint)
    • Line 206: warning: exported method CoinminePow.Collect should have comment or be unexported (golint)
    • Line 231: warning: exported method CoinminePow.Name should have comment or be unexported (golint)
    • Line 233: warning: exported type UupoolPow should have comment or be unexported (golint)
    • Line 237: warning: exported function NewUupool should have comment or be unexported (golint)
    • Line 250: warning: exported method UupoolPow.Collect should have comment or be unexported (golint)
    • Line 277: warning: exported method UupoolPow.Name should have comment or be unexported (golint)
    • pdanalytics/vsp/types.go
    • Line 16: warning: exported type Response should have comment or be unexported (golint)
    • Line 18: warning: exported type VSPDto should have comment or be unexported (golint)
    • Line 29: warning: exported type VSPTickDto should have comment or be unexported (golint)
    • Line 44: warning: exported type ResposeData should have comment or be unexported (golint)
    • Line 62: warning: exported type DataStore should have comment or be unexported (golint)
    • Line 78: warning: exported type Collector should have comment or be unexported (golint)
    • Line 86: warning: exported type PoolTickTimeExistsError should have comment or be unexported (golint)
    • Line 96: warning: exported type ChartPoints should have comment or be unexported (golint)
    • Line 98: warning: exported type ChartData should have comment or be unexported (golint)
    • pdanalytics/postgres/network_snapshot.go
    • Line 19: warning: exported method PgDb.SaveSnapshot should have comment or be unexported (golint)
    • Line 66: warning: exported method PgDb.FindNetworkSnapshot should have comment or be unexported (golint)
    • Line 74: warning: exported method PgDb.PreviousSnapshot should have comment or be unexported (golint)
    • Line 88: warning: exported method PgDb.SnapshotCount should have comment or be unexported (golint)
    • Line 92: warning: exported method PgDb.Snapshots should have comment or be unexported (golint)
    • Line 123: warning: exported method PgDb.SnapshotsByTime should have comment or be unexported (golint)
    • Line 154: warning: exported method PgDb.SnapshotsByBin should have comment or be unexported (golint)
    • Line 177: warning: exported method PgDb.NextSnapshot should have comment or be unexported (golint)
    • Line 215: warning: exported method PgDb.DeleteSnapshot should have comment or be unexported (golint)
    • Line 245: warning: exported method PgDb.SaveHeartbeat should have comment or be unexported (golint)
    • Line 284: warning: exported method PgDb.AttemptPeer should have comment or be unexported (golint)
    • Line 315: warning: exported method PgDb.NodeExists should have comment or be unexported (golint)
    • Line 319: warning: exported method PgDb.FindNode should have comment or be unexported (golint)
    • Line 319: warning: receiver name pd should be consistent with previous receiver name pg for PgDb (golint)
    • Line 395: warning: exported method PgDb.NetworkPeers should have comment or be unexported (golint)
    • Line 446: warning: exported method PgDb.GetAvailableNodes should have comment or be unexported (golint)
    • Line 461: warning: exported method PgDb.NetworkPeer should have comment or be unexported (golint)
    • Line 493: warning: exported method PgDb.AverageLatency should have comment or be unexported (golint)
    • Line 539: warning: exported method PgDb.GetIPLocation should have comment or be unexported (golint)
    • Line 550: warning: exported method PgDb.TotalPeerCount should have comment or be unexported (golint)
    • Line 554: warning: exported method PgDb.SeenNodesByTimestamp should have comment or be unexported (golint)
    • Line 562: warning: exported method PgDb.PeerCountByUserAgents should have comment or be unexported (golint)
    • Line 650: warning: exported method PgDb.PeerCountByCountries should have comment or be unexported (golint)
    • Line 732: warning: exported method PgDb.NodeLocationsByBin should have comment or be unexported (golint)
    • Line 755: warning: exported method PgDb.PeerCountByIPVersion should have comment or be unexported (golint)
    • Line 766: warning: exported method PgDb.LastSnapshotTime should have comment or be unexported (golint)
    • Line 772: warning: exported method PgDb.LastSnapshot should have comment or be unexported (golint)
    • Line 776: warning: exported method PgDb.AllNodeVersions should have comment or be unexported (golint)
    • Line 786: warning: exported method PgDb.AllNodeContries should have comment or be unexported (golint)
    • Line 794: warning: exported method PgDb.NodeVersionsByBin should have comment or be unexported (golint)
    • Line 817: warning: exported method PgDb.UpdateSnapshotNodesBin should have comment or be unexported (golint)
    • Line 993: warning: exported method PgDb.UpdateNodeVersion should have comment or be unexported (golint)
    • Line 1226: warning: exported method PgDb.UpdateNodeLocation should have comment or be unexported (golint)
    • Line 1411: warning: exported method PgDb.FetchNodeLocations should have comment or be unexported (golint)
    • Line 1439: warning: exported method PgDb.FetchNodeVersion should have comment or be unexported (golint)
    • pdanalytics/app/helpers/helpers.go
    • Line 65: warning: exported function AddParams should have comment or be unexported (golint)
    • Line 99: warning: exported function NowUTC should have comment or be unexported (golint)
    • Line 103: warning: exported function UnixTime should have comment or be unexported (golint)
    • Line 107: warning: exported function DurationToString should have comment or be unexported (golint)
    • pdanalytics/commstats/types.go
    • Line 15: warning: exported type CommStat should have comment or be unexported (golint)
    • Line 24: warning: exported type RedditResponse should have comment or be unexported (golint)
    • Line 29: warning: exported type Reddit should have comment or be unexported (golint)
    • Line 36: warning: exported type Github should have comment or be unexported (golint)
    • Line 43: warning: exported type Youtube should have comment or be unexported (golint)
    • Line 50: warning: exported type Twitter should have comment or be unexported (golint)
    • Line 56: warning: exported type ChartData should have comment or be unexported (golint)
    • Line 61: warning: exported type DataStore should have comment or be unexported (golint)
    • Line 80: warning: exported type Collector should have comment or be unexported (golint)
    • Line 87: warning: exported type CommunityStatOptions should have comment or be unexported (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.

    • pdanalytics/web/server.go
    • Line 12: warning: no required module provides package github.com/planetdecred/pdanalytics/version; to add it: (ineffassign)
    • Line 12: warning: could not import github.com/planetdecred/pdanalytics/version (invalid package name: "") (ineffassign)
    • pdanalytics/postgres/commstat.go
    • Line 10: warning: could not import github.com/planetdecred/pdanalytics/postgres/models (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/planetdecred/pdanalytics/postgres/models (invalid package name: "") (ineffassign)
    • pdanalytics/commstats/handlers.go
    • Line 10: warning: no required module provides package github.com/planetdecred/pdanalytics/postgres/models; to add it: (ineffassign)
    • Line 10: warning: could not import github.com/planetdecred/pdanalytics/postgres/models (invalid package name: "") (ineffassign)
    • Line 10: warning: no required module provides package github.com/planetdecred/pdanalytics/postgres/models; to add it: (ineffassign)
    • Line 10: warning: could not import github.com/planetdecred/pdanalytics/postgres/models (invalid package name: "") (ineffassign)

misspell98%

Misspell Finds commonly misspelled English words