Preparing report...

Report for github.com/m-lab/etl

A+    Excellent!    Found 40 issues across 84 files

Tweet

gofmt94%

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!


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.

    • etl/parser/ndt.go
    • Line 462: warning: cyclomatic complexity 22 of function (*NDTParser).getAndInsertValues() is high (> 15) (gocyclo)
    • Line 220: warning: cyclomatic complexity 16 of function (*NDTParser).ParseAndInsert() is high (> 15) (gocyclo)
    • etl/parser/pt.go
    • Line 775: warning: cyclomatic complexity 23 of function Parse() is high (> 15) (gocyclo)
    • Line 667: warning: cyclomatic complexity 22 of function ProcessOneTuple() is high (> 15) (gocyclo)
    • Line 433: warning: cyclomatic complexity 19 of function ParseFirstLine() is high (> 15) (gocyclo)
    • Line 555: warning: cyclomatic complexity 17 of function (*PTParser).ParseAndInsert() is high (> 15) (gocyclo)

golint75%

Golint is a linter for Go source code.

    • etl/parser/ndt5_result.go
    • Line 129: warning: exported method NDT5ResultParser.Flush should have comment or be unexported (golint)
    • Line 133: warning: exported method NDT5ResultParser.TableName should have comment or be unexported (golint)
    • Line 137: warning: exported method NDT5ResultParser.FullTableName should have comment or be unexported (golint)
    • etl/parser/pt.go
    • Line 27: warning: comment on exported type PTFileName should be of the form "PTFileName ..." (with optional leading article) (golint)
    • Line 34: warning: exported method PTFileName.GetDate should have comment or be unexported (golint)
    • Line 43: warning: comment on exported function GetLogtime should be of the form "GetLogtime ..." (golint)
    • Line 57: warning: exported type TS should have comment or be unexported (golint)
    • Line 62: warning: exported type Reply should have comment or be unexported (golint)
    • Line 66: warning: don't use underscores in Go names; struct field Icmp_type should be IcmpType (golint)
    • Line 67: warning: don't use underscores in Go names; struct field Icmp_code should be IcmpCode (golint)
    • Line 68: warning: don't use underscores in Go names; struct field Icmp_q_tos should be IcmpQTos (golint)
    • Line 69: warning: don't use underscores in Go names; struct field Icmp_q_ttl should be IcmpQTTL (golint)
    • Line 72: warning: exported type Probe should have comment or be unexported (golint)
    • Line 81: warning: exported type ScamperLink should have comment or be unexported (golint)
    • Line 86: warning: exported type ScamperNode should have comment or be unexported (golint)
    • Line 89: warning: don't use underscores in Go names; struct field Q_ttl should be QTTL (golint)
    • Line 100: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 107: warning: exported type CyclestartLine should have comment or be unexported (golint)
    • Line 109: warning: don't use underscores in Go names; struct field List_name should be ListName (golint)
    • Line 112: warning: don't use underscores in Go names; struct field Start_time should be StartTime (golint)
    • Line 115: warning: exported type TracelbLine should have comment or be unexported (golint)
    • Line 123: warning: don't use underscores in Go names; struct field Probe_size should be ProbeSize (golint)
    • Line 129: warning: don't use underscores in Go names; struct field Wait_timeout should be WaitTimeout (golint)
    • Line 130: warning: don't use underscores in Go names; struct field Wait_probe should be WaitProbe (golint)
    • Line 132: warning: don't use underscores in Go names; struct field Probec_max should be ProbecMax (golint)
    • Line 138: warning: exported type CyclestopLine should have comment or be unexported (golint)
    • Line 140: warning: don't use underscores in Go names; struct field List_name should be ListName (golint)
    • Line 143: warning: don't use underscores in Go names; struct field Stop_time should be StopTime (golint)
    • Line 146: warning: comment on exported function ParsePT should be of the form "ParsePT ..." (golint)
    • Line 250: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 335: warning: exported type PTParser should have comment or be unexported (golint)
    • Line 343: warning: exported type Node should have comment or be unexported (golint)
    • Line 347: warning: don't use underscores in Go names; struct field parent_ip should be parentIP (golint)
    • Line 348: warning: don't use underscores in Go names; struct field parent_hostname should be parentHostname (golint)
    • Line 358: warning: don't use underscores in Go names; const IPv4_AF should be IPv4AF (golint)
    • Line 358: warning: exported const IPv4_AF should have comment or be unexported (golint)
    • Line 359: warning: don't use underscores in Go names; const IPv6_AF should be IPv6AF (golint)
    • Line 359: warning: exported const IPv6_AF should have comment or be unexported (golint)
    • Line 360: warning: exported const PTBufferSize should have comment or be unexported (golint)
    • Line 362: warning: exported function NewPTParser should have comment or be unexported (golint)
    • Line 374: warning: don't use underscores in Go names; func parameter server_IP should be serverIP (golint)
    • Line 420: warning: comment on exported function Unique should be of the form "Unique ..." (golint)
    • Line 431: warning: comment on exported function ParseFirstLine should be of the form "ParseFirstLine ..." (golint)
    • Line 469: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 478: warning: exported method PTParser.TaskError should have comment or be unexported (golint)
    • Line 482: warning: exported method PTParser.TableName should have comment or be unexported (golint)
    • Line 486: warning: exported method PTParser.InsertOneTest should have comment or be unexported (golint)
    • Line 512: warning: comment on exported method PTParser.ProcessLastTests should be of the form "ProcessLastTests ..." (golint)
    • Line 522: warning: exported method PTParser.Flush should have comment or be unexported (golint)
    • Line 529: warning: exported function CreateTestId should have comment or be unexported (golint)
    • Line 541: warning: exported method PTParser.NumBufferedTests should have comment or be unexported (golint)
    • Line 662: warning: comment on exported function ProcessOneTuple should be of the form "ProcessOneTuple ..." (golint)
    • Line 745: warning: don't use underscores in Go names; var flow_int should be flowInt (golint)
    • etl/parser/ss.go
    • Line 37: warning: comment on exported function NewDefaultSSParser should be of the form "NewDefaultSSParser ..." (golint)
    • etl/cmd/update-schema/update.go
    • Line 38: warning: exported function CreateOrUpdatePT should have comment or be unexported (golint)
    • Line 46: warning: exported function CreateOrUpdateSS should have comment or be unexported (golint)
    • Line 53: warning: exported function CreateOrUpdateNDTWeb100 should have comment or be unexported (golint)
    • Line 61: warning: exported function CreateOrUpdateNDT5ResultRow should have comment or be unexported (golint)
    • Line 70: warning: exported function CreateOrUpdateNDT5ResultRowStandardColumns should have comment or be unexported (golint)
    • Line 79: warning: exported function CreateOrUpdateNDT7ResultRow should have comment or be unexported (golint)
    • Line 86: warning: exported function CreateOrUpdateAnnotationRow should have comment or be unexported (golint)
    • Line 93: warning: exported function CreateOrUpdateSwitchStats should have comment or be unexported (golint)
    • etl/web100/web100.go
    • Line 1: warning: package comment should be of the form "Package web100 ..." (golint)
    • Line 118: warning: comment on exported const WEB100_TYPE_INTEGER should be of the form "WEB100_TYPE_INTEGER ..." (golint)
    • Line 121: warning: exported const WEB100_TYPE_INTEGER32 should have comment (or a comment on this block) or be unexported (golint)
    • Line 139: warning: comment on exported const WEB100_ADDRTYPE_UNKNOWN should be of the form "WEB100_ADDRTYPE_UNKNOWN ..." (golint)
    • Line 142: warning: exported const WEB100_ADDRTYPE_IPV4 should have comment (or a comment on this block) or be unexported (golint)
    • Line 334: warning: exported method SnapLog.ConnectionSpecValues should have comment or be unexported (golint)
    • Line 618: warning: exported type IntArraySaver should have comment or be unexported (golint)
    • Line 622: warning: exported function NewIntArraySaver should have comment or be unexported (golint)
    • Line 626: warning: exported method IntArraySaver.SetInt64 should have comment or be unexported (golint)
    • Line 629: warning: exported method IntArraySaver.SetBool should have comment or be unexported (golint)
    • Line 630: warning: exported method IntArraySaver.SetString should have comment or be unexported (golint)
    • Line 632: warning: comment on exported method SnapLog.SliceIntField should be of the form "SliceIntField ..." (golint)
    • etl/metrics/metrics.go
    • Line 392: warning: comment on exported var RowSizeHistogram should be of the form "RowSizeHistogram ..." (golint)
    • Line 418: warning: comment on exported var DeltaNumFieldsHistogram should be of the form "DeltaNumFieldsHistogram ..." (golint)
    • Line 443: warning: comment on exported var EntryFieldCountHistogram should be of the form "EntryFieldCountHistogram ..." (golint)
    • etl/parser/annotation.go
    • Line 127: warning: exported method AnnotationParser.Flush should have comment or be unexported (golint)
    • Line 131: warning: exported method AnnotationParser.TableName should have comment or be unexported (golint)
    • Line 135: warning: exported method AnnotationParser.FullTableName should have comment or be unexported (golint)
    • etl/parser/disco.go
    • Line 25: warning: comment on exported type DiscoParser should be of the form "DiscoParser ..." (with optional leading article) (golint)
    • Line 31: warning: exported function NewDiscoParser should have comment or be unexported (golint)
    • Line 37: warning: exported method DiscoParser.TaskError should have comment or be unexported (golint)
    • Line 55: warning: comment on exported method DiscoParser.ParseAndInsert should be of the form "ParseAndInsert ..." (golint)
    • Line 157: warning: comment on exported method DiscoParser.Flush should be of the form "Flush ..." (golint)
    • Line 163: warning: exported method DiscoParser.TableName should have comment or be unexported (golint)
    • Line 167: warning: exported method DiscoParser.FullTableName should have comment or be unexported (golint)
    • etl/parser/ndt7_result.go
    • Line 198: warning: exported method NDT7ResultParser.Flush should have comment or be unexported (golint)
    • Line 202: warning: exported method NDT7ResultParser.TableName should have comment or be unexported (golint)
    • Line 206: warning: exported method NDT7ResultParser.FullTableName should have comment or be unexported (golint)
    • etl/parser/ndt_meta.go
    • Line 32: warning: exported const CLIENT_TO_SERVER should have comment (or a comment on this block) or be unexported (golint)
    • Line 75: warning: exported method MetaFileData.PopulateConnSpec should have comment or be unexported (golint)
    • etl/schema/sidestream_schema.go
    • Line 1: warning: package comment should be of the form "Package schema ..." (golint)
    • Line 13: warning: exported type Web100ConnectionSpecification should have comment or be unexported (golint)
    • Line 14: warning: don't use underscores in Go names; struct field Local_ip should be LocalIP (golint)
    • Line 15: warning: don't use underscores in Go names; struct field Local_af should be LocalAf (golint)
    • Line 16: warning: don't use underscores in Go names; struct field Local_port should be LocalPort (golint)
    • Line 17: warning: don't use underscores in Go names; struct field Remote_ip should be RemoteIP (golint)
    • Line 18: warning: don't use underscores in Go names; struct field Remote_port should be RemotePort (golint)
    • Line 19: warning: don't use underscores in Go names; struct field Local_geolocation should be LocalGeolocation (golint)
    • Line 20: warning: don't use underscores in Go names; struct field Remote_geolocation should be RemoteGeolocation (golint)
    • Line 23: warning: exported type Web100Snap should have comment or be unexported (golint)
    • Line 153: warning: don't use underscores in Go names; struct field WAD_CwndAdjust should be WADCwndAdjust (golint)
    • Line 155: warning: don't use underscores in Go names; struct field WAD_MaxBurst should be WADMaxBurst (golint)
    • Line 156: warning: don't use underscores in Go names; struct field WAD_MaxSsthresh should be WADMaxSsthresh (golint)
    • Line 157: warning: don't use underscores in Go names; struct field WAD_NoAI should be WADNoAI (golint)
    • Line 162: warning: don't use underscores in Go names; struct field X_OtherReductionsCM should be XOtherReductionsCM (golint)
    • Line 163: warning: don't use underscores in Go names; struct field X_OtherReductionsCV should be XOtherReductionsCV (golint)
    • Line 164: warning: don't use underscores in Go names; struct field X_Rcvbuf should be XRcvbuf (golint)
    • Line 165: warning: don't use underscores in Go names; struct field X_Sndbuf should be XSndbuf (golint)
    • Line 166: warning: don't use underscores in Go names; struct field X_dbg1 should be XDbg1 (golint)
    • Line 167: warning: don't use underscores in Go names; struct field X_dbg2 should be XDbg2 (golint)
    • Line 168: warning: don't use underscores in Go names; struct field X_dbg3 should be XDbg3 (golint)
    • Line 169: warning: don't use underscores in Go names; struct field X_dbg4 should be XDbg4 (golint)
    • Line 170: warning: don't use underscores in Go names; struct field X_rcv_ssthresh should be XRcvSsthresh (golint)
    • Line 171: warning: don't use underscores in Go names; struct field X_wnd_clamp should be XWndClamp (golint)
    • Line 176: warning: exported type Web100LogEntry should have comment or be unexported (golint)
    • Line 179: warning: don't use underscores in Go names; struct field Group_name should be GroupName (golint)
    • Line 180: warning: don't use underscores in Go names; struct field Connection_spec should be ConnectionSpec (golint)
    • Line 184: warning: exported type Anomalies should have comment or be unexported (golint)
    • Line 185: warning: don't use underscores in Go names; struct field Exclusion_level should be ExclusionLevel (golint)
    • Line 188: warning: exported type SS should have comment or be unexported (golint)
    • Line 197: warning: don't use underscores in Go names; struct field Web100_log_entry should be Web100LogEntry (golint)
    • Line 242: warning: exported method SS.Schema should have comment or be unexported (golint)
    • etl/fake/uploader.go
    • Line 259: warning: exported method FakeUploader.SetErr should have comment or be unexported (golint)
    • Line 263: warning: exported function NewFakeUploader should have comment or be unexported (golint)
    • etl/schema/web100.go
    • Line 1: warning: package comment should be of the form "Package schema ..." (golint)
    • Line 28: warning: receiver name vm should be consistent with previous receiver name s for Web100ValueMap (golint)
    • Line 41: warning: comment on exported method Web100ValueMap.GetString should be of the form "GetString ..." (golint)
    • Line 43: warning: receiver name vm should be consistent with previous receiver name s for Web100ValueMap (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 61: warning: comment on exported method Web100ValueMap.GetInt64 should be of the form "GetInt64 ..." (golint)
    • Line 63: warning: receiver name vm should be consistent with previous receiver name s for Web100ValueMap (golint)
    • Line 68: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 75: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 81: warning: comment on exported method Web100ValueMap.GetMap should be of the form "GetMap ..." (golint)
    • Line 82: warning: receiver name vm should be consistent with previous receiver name s for Web100ValueMap (golint)
    • Line 108: warning: comment on exported method Web100ValueMap.SubstituteString should be of the form "SubstituteString ..." (golint)
    • Line 110: warning: receiver name r should be consistent with previous receiver name s for Web100ValueMap (golint)
    • Line 129: warning: comment on exported method Web100ValueMap.SubstituteInt64 should be of the form "SubstituteInt64 ..." (golint)
    • Line 131: warning: receiver name r should be consistent with previous receiver name s for Web100ValueMap (golint)
    • Line 168: warning: exported function EmptySnap10 should have comment or be unexported (golint)
    • Line 172: warning: exported function EmptySnap should have comment or be unexported (golint)
    • Line 187: warning: exported function FullConnectionSpec should have comment or be unexported (golint)
    • Line 209: warning: exported function EmptyConnectionSpec should have comment or be unexported (golint)
    • Line 218: warning: exported function FullGeolocation should have comment or be unexported (golint)
    • Line 234: warning: exported function EmptyGeolocation should have comment or be unexported (golint)
    • etl/parser/ndt.go
    • Line 634: warning: comment on exported const WC_ADDRTYPE_IPV4 should be of the form "WC_ADDRTYPE_IPV4 ..." (golint)
    • Line 636: warning: exported const WC_ADDRTYPE_IPV6 should have comment (or a comment on this block) or be unexported (golint)
    • etl/schema/ndt_web100.go
    • Line 196: warning: don't use underscores in Go names; struct field X_OtherReductionsCM should be XOtherReductionsCM (golint)
    • Line 197: warning: don't use underscores in Go names; struct field X_OtherReductionsCV should be XOtherReductionsCV (golint)
    • Line 198: warning: don't use underscores in Go names; struct field X_Rcvbuf should be XRcvbuf (golint)
    • Line 199: warning: don't use underscores in Go names; struct field X_Sndbuf should be XSndbuf (golint)
    • Line 200: warning: don't use underscores in Go names; struct field X_dbg1 should be XDbg1 (golint)
    • Line 201: warning: don't use underscores in Go names; struct field X_dbg2 should be XDbg2 (golint)
    • Line 202: warning: don't use underscores in Go names; struct field X_dbg3 should be XDbg3 (golint)
    • Line 203: warning: don't use underscores in Go names; struct field X_dbg4 should be XDbg4 (golint)
    • Line 204: warning: don't use underscores in Go names; struct field X_rcv_ssthresh should be XRcvSsthresh (golint)
    • Line 205: warning: don't use underscores in Go names; struct field X_wnd_clamp should be XWndClamp (golint)
    • Line 215: warning: exported method NDTWeb100.Schema should have comment or be unexported (golint)
    • etl/schema/pt_schema.go
    • Line 1: warning: package comment should be of the form "Package schema ..." (golint)
    • Line 15: warning: exported type HopIP should have comment or be unexported (golint)
    • Line 23: warning: exported type HopProbe should have comment or be unexported (golint)
    • Line 28: warning: exported type HopLink should have comment or be unexported (golint)
    • Line 34: warning: exported type ScamperHop should have comment or be unexported (golint)
    • Line 40: warning: exported type PTTest should have comment or be unexported (golint)
    • Line 85: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • Line 96: warning: exported method PTTest.AnnotateHops should have comment or be unexported (golint)
    • Line 97: warning: should omit 2nd value from range; this loop is equivalent to `for index := range ...` (golint)
    • etl/parser/parser.go
    • Line 104: warning: exported method FakeRowStats.RowsInBuffer should have comment or be unexported (golint)
    • Line 107: warning: exported method FakeRowStats.Accepted should have comment or be unexported (golint)
    • Line 110: warning: exported method FakeRowStats.Committed should have comment or be unexported (golint)
    • Line 113: warning: exported method FakeRowStats.Failed should have comment or be unexported (golint)
    • Line 117: warning: exported type NullParser should have comment or be unexported (golint)
    • Line 121: warning: exported method NullParser.ParseAndInsert should have comment or be unexported (golint)
    • Line 125: warning: exported method NullParser.TableName should have comment or be unexported (golint)
    • Line 128: warning: exported method NullParser.TaskError should have comment or be unexported (golint)
    • etl/fake/fields.go
    • Line 25: warning: exported type ParseTagFunc should have comment or be unexported (golint)
    • Line 27: warning: exported type ValidateFunc should have comment or be unexported (golint)
    • Line 29: warning: exported type LeafTypesFunc should have comment or be unexported (golint)
    • Line 31: warning: comment on exported type FieldCache should be of the form "FieldCache ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported function NewFieldCache should be of the form "NewFieldCache ..." (golint)
    • etl/bq/insert.go
    • Line 510: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 525: warning: exported method BQInserter.FullTableName should have comment or be unexported (golint)
    • Line 528: warning: exported method BQInserter.TableBase should have comment or be unexported (golint)
    • Line 532: warning: comment on exported method BQInserter.TableSuffix should be of the form "TableSuffix ..." (golint)
    • Line 536: warning: exported method BQInserter.Project should have comment or be unexported (golint)
    • Line 539: warning: exported method BQInserter.Dataset should have comment or be unexported (golint)
    • Line 543: warning: exported method BQInserter.RowsInBuffer should have comment or be unexported (golint)
    • Line 546: warning: exported method BQInserter.Accepted should have comment or be unexported (golint)
    • Line 551: warning: exported method BQInserter.Committed should have comment or be unexported (golint)
    • Line 556: warning: exported method BQInserter.Failed should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign92%

IneffAssign detects ineffectual assignments in Go code.

    • etl/parser/pt_test.go
    • Line 207: warning: ineffectual assignment to protocol (ineffassign)
    • Line 207: warning: ineffectual assignment to dest_ip (ineffassign)
    • Line 207: warning: ineffectual assignment to server_ip (ineffassign)
    • Line 214: warning: ineffectual assignment to protocol (ineffassign)
    • Line 214: warning: ineffectual assignment to dest_ip (ineffassign)
    • Line 214: warning: ineffectual assignment to server_ip (ineffassign)

misspell90%

Misspell Finds commonly misspelled English words

    • etl/site/site.go
    • Line 91: warning: "existant" is a misspelling of "existent" (misspell)
    • Line 101: warning: "approprate" is a misspelling of "appropriate" (misspell)