Preparing report...

Report for github.com/chengshiwen/influx-proxy

A    Great!    Found 18 issues across 20 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!


gocyclo85%

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.


golint10%

Golint is a linter for Go source code.

    • influx-proxy/util/escape.go
    • Line 18: warning: exported function EscapeIdentifier should have comment or be unexported (golint)
    • Line 22: warning: exported function UnescapeIdentifier should have comment or be unexported (golint)
    • Line 29: warning: exported function EscapeMeasurement should have comment or be unexported (golint)
    • Line 33: warning: exported function UnescapeMeasurement should have comment or be unexported (golint)
    • Line 40: warning: exported function EscapeTag should have comment or be unexported (golint)
    • Line 44: warning: exported function UnescapeTag should have comment or be unexported (golint)
    • influx-proxy/util/set.go
    • Line 7: warning: comment on exported type Set should be of the form "Set ..." (with optional leading article) (golint)
    • Line 10: warning: exported function NewSet should have comment or be unexported (golint)
    • Line 18: warning: exported function NewSetFromSlice should have comment or be unexported (golint)
    • Line 22: warning: exported method Set.Add should have comment or be unexported (golint)
    • Line 26: warning: exported method Set.Remove should have comment or be unexported (golint)
    • influx-proxy/service/http.go
    • Line 26: warning: exported var ErrInvalidTick should have comment or be unexported (golint)
    • Line 33: warning: exported type HttpService should have comment or be unexported (golint)
    • Line 43: warning: exported function NewHttpService should have comment or be unexported (golint)
    • Line 57: warning: exported method HttpService.Register should have comment or be unexported (golint)
    • Line 75: warning: exported method HttpService.HandlerPing should have comment or be unexported (golint)
    • Line 80: warning: exported method HttpService.HandlerQuery should have comment or be unexported (golint)
    • Line 100: warning: exported method HttpService.HandlerWrite should have comment or be unexported (golint)
    • Line 145: warning: exported method HttpService.HandlerHealth should have comment or be unexported (golint)
    • Line 154: warning: exported method HttpService.HandlerReplica should have comment or be unexported (golint)
    • Line 179: warning: exported method HttpService.HandlerEncrypt should have comment or be unexported (golint)
    • Line 189: warning: exported method HttpService.HandlerDencrypt should have comment or be unexported (golint)
    • Line 204: warning: exported method HttpService.HandlerRebalance should have comment or be unexported (golint)
    • Line 259: warning: exported method HttpService.HandlerRecovery should have comment or be unexported (golint)
    • Line 301: warning: exported method HttpService.HandlerResync should have comment or be unexported (golint)
    • Line 335: warning: exported method HttpService.HandlerCleanup should have comment or be unexported (golint)
    • Line 366: warning: exported method HttpService.HandlerTransferState should have comment or be unexported (golint)
    • Line 424: warning: exported method HttpService.HandlerTransferStats should have comment or be unexported (golint)
    • Line 455: warning: exported method HttpService.WriteError should have comment or be unexported (golint)
    • Line 464: warning: exported method HttpService.WriteBody should have comment or be unexported (golint)
    • Line 469: warning: exported method HttpService.WriteText should have comment or be unexported (golint)
    • Line 474: warning: exported method HttpService.WriteHeader should have comment or be unexported (golint)
    • influx-proxy/backend/config.go
    • Line 17: warning: exported const Version should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported var ErrEmptyCircles should have comment or be unexported (golint)
    • Line 28: warning: exported type BackendConfig should have comment or be unexported (golint)
    • Line 36: warning: exported type CircleConfig should have comment or be unexported (golint)
    • Line 41: warning: exported type ProxyConfig should have comment or be unexported (golint)
    • Line 65: warning: exported function NewFileConfig should have comment or be unexported (golint)
    • Line 146: warning: exported method ProxyConfig.PrintSummary should have comment or be unexported (golint)
    • influx-proxy/backend/proxy.go
    • Line 21: warning: exported type Proxy should have comment or be unexported (golint)
    • Line 26: warning: exported function NewProxy should have comment or be unexported (golint)
    • Line 41: warning: exported function GetKey should have comment or be unexported (golint)
    • Line 50: warning: exported method Proxy.GetBackends should have comment or be unexported (golint)
    • Line 58: warning: exported method Proxy.GetHealth should have comment or be unexported (golint)
    • Line 72: warning: exported method Proxy.Query should have comment or be unexported (golint)
    • Line 132: warning: exported method Proxy.WriteRow should have comment or be unexported (golint)
    • influx-proxy/backend/result.go
    • Line 38: warning: exported method Response.Unmarshal should have comment or be unexported (golint)
    • Line 44: warning: exported function SeriesFromResponseBytes should have comment or be unexported (golint)
    • Line 53: warning: exported function ResultsFromResponseBytes should have comment or be unexported (golint)
    • Line 62: warning: exported function ResponseFromResponseBytes should have comment or be unexported (golint)
    • Line 68: warning: exported function ResponseFromSeries should have comment or be unexported (golint)
    • Line 78: warning: exported function ResponseFromResults should have comment or be unexported (golint)
    • Line 85: warning: exported function ResponseFromError should have comment or be unexported (golint)
    • influx-proxy/util/util.go
    • Line 16: warning: exported function PathExist should have comment or be unexported (golint)
    • Line 27: warning: exported function MakeDir should have comment or be unexported (golint)
    • Line 41: warning: exported function GzipCompress should have comment or be unexported (golint)
    • Line 57: warning: exported function MarshalJSON should have comment or be unexported (golint)
    • influx-proxy/backend/circle.go
    • Line 14: warning: exported type Circle should have comment or be unexported (golint)
    • Line 24: warning: exported function NewCircle should have comment or be unexported (golint)
    • Line 64: warning: exported method Circle.GetBackend should have comment or be unexported (golint)
    • Line 74: warning: exported method Circle.GetHealth should have comment or be unexported (golint)
    • Line 98: warning: exported method Circle.IsActive should have comment or be unexported (golint)
    • influx-proxy/backend/file.go
    • Line 16: warning: exported type FileBackend should have comment or be unexported (golint)
    • Line 26: warning: exported function NewFileBackend should have comment or be unexported (golint)
    • Line 88: warning: exported method FileBackend.IsData should have comment or be unexported (golint)
    • Line 115: warning: exported method FileBackend.RollbackMeta should have comment or be unexported (golint)
    • Line 142: warning: exported method FileBackend.UpdateMeta should have comment or be unexported (golint)
    • Line 189: warning: exported method FileBackend.CleanUp should have comment or be unexported (golint)
    • Line 215: warning: exported method FileBackend.Close should have comment or be unexported (golint)
    • influx-proxy/backend/influxql.go
    • Line 17: warning: exported var SupportCmds should have comment or be unexported (golint)
    • Line 34: warning: exported var ErrWrongQuote should have comment or be unexported (golint)
    • Line 40: warning: exported function FindEndWithQuote should have comment or be unexported (golint)
    • Line 69: warning: exported function ScanToken should have comment or be unexported (golint)
    • Line 143: warning: exported function ScanTokens should have comment or be unexported (golint)
    • Line 158: warning: exported function GetHeadStmtFromTokens should have comment or be unexported (golint)
    • Line 165: warning: exported function GetDatabaseFromInfluxQL should have comment or be unexported (golint)
    • Line 169: warning: exported function GetMeasurementFromInfluxQL should have comment or be unexported (golint)
    • Line 173: warning: exported function GetDatabaseFromTokens should have comment or be unexported (golint)
    • Line 177: warning: exported function GetMeasurementFromTokens should have comment or be unexported (golint)
    • Line 181: warning: exported function GetIdentifierFromTokens should have comment or be unexported (golint)
    • Line 243: warning: exported function FindLastIndexWithIdent should have comment or be unexported (golint)
    • Line 260: warning: exported function CheckQuery should have comment or be unexported (golint)
    • Line 295: warning: exported function CheckDatabaseFromTokens should have comment or be unexported (golint)
    • Line 306: warning: exported function CheckSelectOrShowFromTokens should have comment or be unexported (golint)
    • Line 312: warning: exported function CheckDeleteOrDropMeasurementFromTokens should have comment or be unexported (golint)
    • influx-proxy/util/cipher.go
    • Line 22: warning: exported function CheckCipherKey should have comment or be unexported (golint)
    • Line 26: warning: exported function AesEncrypt should have comment or be unexported (golint)
    • Line 37: warning: exported function AesDecrypt should have comment or be unexported (golint)
    • influx-proxy/backend/backend.go
    • Line 18: warning: exported type CacheBuffer should have comment or be unexported (golint)
    • Line 23: warning: exported type Backend should have comment or be unexported (golint)
    • Line 38: warning: exported function NewBackend should have comment or be unexported (golint)
    • Line 63: warning: exported function NewSimpleBackend should have comment or be unexported (golint)
    • Line 90: warning: exported method Backend.WritePoint should have comment or be unexported (golint)
    • Line 95: warning: exported method Backend.WriteBuffer should have comment or be unexported (golint)
    • Line 133: warning: exported method Backend.FlushBuffer should have comment or be unexported (golint)
    • Line 182: warning: exported method Backend.Flush should have comment or be unexported (golint)
    • Line 191: warning: exported method Backend.RewriteIdle should have comment or be unexported (golint)
    • Line 198: warning: exported method Backend.RewriteLoop should have comment or be unexported (golint)
    • Line 213: warning: exported method Backend.Rewrite should have comment or be unexported (golint)
    • Line 260: warning: exported method Backend.Close should have comment or be unexported (golint)
    • Line 265: warning: exported method Backend.GetHealth should have comment or be unexported (golint)
    • influx-proxy/backend/executor.go
    • Line 19: warning: exported var ErrEmptyQuery should have comment or be unexported (golint)
    • Line 26: warning: exported function QueryFromQL should have comment or be unexported (golint)
    • Line 58: warning: exported function QueryShowQL should have comment or be unexported (golint)
    • Line 103: warning: exported function QueryDeleteOrDropQL should have comment or be unexported (golint)
    • Line 126: warning: exported function QueryAlterQL should have comment or be unexported (golint)
    • Line 144: warning: exported function QueryInParallel should have comment or be unexported (golint)
    • influx-proxy/backend/http.go
    • Line 27: warning: exported var ErrBadRequest should have comment or be unexported (golint)
    • Line 34: warning: exported type QueryResult should have comment or be unexported (golint)
    • Line 41: warning: exported type HttpBackend should have comment or be unexported (golint)
    • Line 54: warning: exported function NewHttpBackend should have comment or be unexported (golint)
    • Line 62: warning: exported function NewSimpleHttpBackend should have comment or be unexported (golint)
    • Line 76: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 80: warning: exported function NewTransport should have comment or be unexported (golint)
    • Line 95: warning: exported function NewQueryRequest should have comment or be unexported (golint)
    • Line 109: warning: exported function CloneQueryRequest should have comment or be unexported (golint)
    • Line 115: warning: exported function Compress should have comment or be unexported (golint)
    • Line 129: warning: exported function CopyHeader should have comment or be unexported (golint)
    • Line 137: warning: exported function SetBasicAuth should have comment or be unexported (golint)
    • Line 145: warning: exported method HttpBackend.SetBasicAuth should have comment or be unexported (golint)
    • Line 149: warning: exported method HttpBackend.CheckActive should have comment or be unexported (golint)
    • Line 156: warning: exported method HttpBackend.IsActive should have comment or be unexported (golint)
    • Line 160: warning: exported method HttpBackend.IsRewriting should have comment or be unexported (golint)
    • Line 164: warning: exported method HttpBackend.SetRewriting should have comment or be unexported (golint)
    • Line 168: warning: exported method HttpBackend.Ping should have comment or be unexported (golint)
    • Line 192: warning: exported method HttpBackend.WriteCompressed should have comment or be unexported (golint)
    • Line 197: warning: exported method HttpBackend.WriteStream should have comment or be unexported (golint)
    • Line 243: warning: exported method HttpBackend.Query should have comment or be unexported (golint)
    • Line 301: warning: exported method HttpBackend.QueryIQL should have comment or be unexported (golint)
    • Line 306: warning: exported method HttpBackend.GetSeriesValues should have comment or be unexported (golint)
    • Line 324: warning: comment on exported method HttpBackend.GetDatabases should be of the form "GetDatabases ..." (golint)
    • Line 329: warning: exported method HttpBackend.GetMeasurements should have comment or be unexported (golint)
    • Line 333: warning: exported method HttpBackend.GetTagKeys should have comment or be unexported (golint)
    • Line 337: warning: exported method HttpBackend.GetFieldKeys should have comment or be unexported (golint)
    • Line 354: warning: exported method HttpBackend.DropMeasurement should have comment or be unexported (golint)
    • Line 360: warning: exported method HttpBackend.Close should have comment or be unexported (golint)
    • influx-proxy/transfer/circlestate.go
    • Line 13: warning: exported type Stats should have comment or be unexported (golint)
    • Line 22: warning: exported type CircleState should have comment or be unexported (golint)
    • Line 29: warning: exported function NewCircleState should have comment or be unexported (golint)
    • Line 41: warning: exported method CircleState.ResetStates should have comment or be unexported (golint)
    • influx-proxy/transfer/transfer.go
    • Line 27: warning: exported var FieldTypes should have comment or be unexported (golint)
    • Line 36: warning: exported type QueryResult should have comment or be unexported (golint)
    • Line 41: warning: exported type Transfer should have comment or be unexported (golint)
    • Line 57: warning: exported function NewTransfer should have comment or be unexported (golint)
    • Line 362: warning: exported method Transfer.Rebalance should have comment or be unexported (golint)
    • Line 399: warning: exported method Transfer.Recovery should have comment or be unexported (golint)
    • Line 449: warning: exported method Transfer.Resync should have comment or be unexported (golint)
    • Line 496: warning: exported method Transfer.Cleanup should have comment or be unexported (golint)
    • influx-proxy/backend/lineproto.go
    • Line 17: warning: exported type LinePoint should have comment or be unexported (golint)
    • Line 22: warning: exported function ScanKey should have comment or be unexported (golint)
    • Line 42: warning: exported function ScanTime should have comment or be unexported (golint)
    • Line 52: warning: exported function AppendNano should have comment or be unexported (golint)
    • Line 74: warning: exported function Int64ToBytes should have comment or be unexported (golint)
    • Line 78: warning: exported function BytesToInt64 should have comment or be unexported (golint)
    • Line 87: warning: exported function RapidCheck should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!