Preparing report...

Report for github.com/hailocab/gocassa

A    Great!    Found 25 issues across 39 files

Tweet

gofmt82%

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!


gocyclo87%

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.

    • gocassa/compare.go
    • Line 80: warning: cyclomatic complexity 16 of function builtinGreaterThan() is high (> 15) (gocyclo)
    • Line 26: warning: cyclomatic complexity 16 of function builtinLessThan() is high (> 15) (gocyclo)
    • Line 134: warning: cyclomatic complexity 16 of function builtinEqual() is high (> 15) (gocyclo)

golint51%

Golint is a linter for Go source code.

    • gocassa/op.go
    • Line 63: warning: receiver name w should be consistent with previous receiver name o for singleOp (golint)
    • Line 73: warning: receiver name w should be consistent with previous receiver name o for singleOp (golint)
    • Line 89: warning: receiver name w should be consistent with previous receiver name o for singleOp (golint)
    • gocassa/options.go
    • Line 9: warning: exported type ColumnDirection should have comment or be unexported (golint)
    • Line 12: warning: exported const ASC should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: comment on exported method Options.Merge should be of the form "Merge ..." (golint)
    • gocassa/relation.go
    • Line 17: warning: exported type Relation should have comment or be unexported (golint)
    • Line 94: warning: exported function Eq should have comment or be unexported (golint)
    • Line 102: warning: exported function In should have comment or be unexported (golint)
    • Line 110: warning: exported function GT should have comment or be unexported (golint)
    • Line 118: warning: exported function GTE should have comment or be unexported (golint)
    • Line 126: warning: exported function LT should have comment or be unexported (golint)
    • Line 134: warning: exported function LTE should have comment or be unexported (golint)
    • gocassa/mock.go
    • Line 77: warning: exported function NewMockKeySpace should have comment or be unexported (golint)
    • Line 203: warning: exported method MockTable.Name should have comment or be unexported (golint)
    • Line 234: warning: exported method MockTable.SetWithOptions should have comment or be unexported (golint)
    • Line 263: warning: exported method MockTable.Set should have comment or be unexported (golint)
    • Line 267: warning: exported method MockTable.Where should have comment or be unexported (golint)
    • Line 274: warning: exported method MockTable.Create should have comment or be unexported (golint)
    • Line 278: warning: exported method MockTable.CreateStatement should have comment or be unexported (golint)
    • Line 282: warning: exported method MockTable.CreateIfNotExist should have comment or be unexported (golint)
    • Line 286: warning: exported method MockTable.CreateIfNotExistStatement should have comment or be unexported (golint)
    • Line 290: warning: exported method MockTable.Recreate should have comment or be unexported (golint)
    • Line 294: warning: exported method MockTable.WithOptions should have comment or be unexported (golint)
    • Line 304: warning: exported type MockDumper should have comment or be unexported (golint)
    • Line 306: warning: exported function Dump should have comment or be unexported (golint)
    • Line 387: warning: exported method MockFilter.UpdateWithOptions should have comment or be unexported (golint)
    • Line 422: warning: exported method MockFilter.Update should have comment or be unexported (golint)
    • Line 426: warning: exported method MockFilter.Delete should have comment or be unexported (golint)
    • Line 463: warning: receiver name q should be consistent with previous receiver name f for MockFilter (golint)
    • Line 500: warning: receiver name q should be consistent with previous receiver name f for MockFilter (golint)
    • Line 504: warning: exported method MockFilter.ReadOne should have comment or be unexported (golint)
    • Line 504: warning: receiver name q should be consistent with previous receiver name f for MockFilter (golint)
    • gocassa/generate.go
    • Line 42: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • gocassa/interfaces.go
    • Line 166: warning: comment on exported type TableChanger should be of the form "TableChanger ..." (with optional leading article) (golint)
    • Line 218: warning: exported type Counter should have comment or be unexported (golint)
    • gocassa/table.go
    • Line 185: 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 193: 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 244: warning: receiver name table should be consistent with previous receiver name t for t (golint)
    • gocassa/keyspace.go
    • Line 20: warning: comment on exported function ConnectToKeySpace should be of the form "ConnectToKeySpace ..." (golint)
    • Line 47: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gocassa/multiop.go
    • Line 5: warning: exported function Noop should have comment or be unexported (golint)
    • Line 49: warning: don't use underscores in Go names; method parameter ops_ should be ops (golint)
    • gocassa/query_test.go
    • Line 24: 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)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign79%

IneffAssign detects ineffectual assignments in Go code.

    • gocassa/op.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/hailocab/gocassa/reflect (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/mitchellh/mapstructure (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/hailocab/gocassa/reflect (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/mitchellh/mapstructure (invalid package name: "") (ineffassign)
    • gocassa/mock_test.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/stretchr/testify/require (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/stretchr/testify/suite (invalid package name: "") (ineffassign)
    • Line 56: warning: s.T undefined (type *MockSuite has no field or method T) (ineffassign)
    • Line 74: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 75: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 82: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 83: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 85: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 86: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 88: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 89: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 91: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 92: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 94: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 95: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 97: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 98: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 100: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 101: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 105: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 106: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 109: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 110: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 112: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 120: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 125: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 126: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 130: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 135: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 137: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 145: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 148: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 149: warning: s.Empty undefined (type *MockSuite has no field or method Empty) (ineffassign)
    • Line 156: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 159: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 160: warning: s.Empty undefined (type *MockSuite has no field or method Empty) (ineffassign)
    • Line 167: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 170: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 171: warning: s.Empty undefined (type *MockSuite has no field or method Empty) (ineffassign)
    • Line 178: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 179: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 180: warning: s.Error undefined (type *MockSuite has no field or method Error) (ineffassign)
    • Line 186: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 187: warning: s.Len undefined (type *MockSuite has no field or method Len) (ineffassign)
    • Line 188: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 189: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 194: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 198: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 199: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 204: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 206: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 214: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 215: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 216: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 217: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 223: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 224: warning: s.Len undefined (type *MockSuite has no field or method Len) (ineffassign)
    • Line 225: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 226: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 234: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 235: warning: s.Len undefined (type *MockSuite has no field or method Len) (ineffassign)
    • Line 236: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 237: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 240: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 241: warning: s.Len undefined (type *MockSuite has no field or method Len) (ineffassign)
    • Line 242: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 245: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 246: warning: s.Len undefined (type *MockSuite has no field or method Len) (ineffassign)
    • Line 247: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 253: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 257: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 258: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 263: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 265: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 270: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 272: warning: s.Empty undefined (type *MockSuite has no field or method Empty) (ineffassign)
    • Line 280: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 281: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 289: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 290: warning: s.Len undefined (type *MockSuite has no field or method Len) (ineffassign)
    • Line 291: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 292: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 295: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 296: warning: s.Len undefined (type *MockSuite has no field or method Len) (ineffassign)
    • Line 297: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 298: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 304: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 309: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 310: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 311: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 318: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 319: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 327: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 328: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 335: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 336: warning: s.Len undefined (type *MockSuite has no field or method Len) (ineffassign)
    • Line 337: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 338: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 340: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 341: warning: s.Len undefined (type *MockSuite has no field or method Len) (ineffassign)
    • Line 342: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 348: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 353: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 354: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 360: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 363: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 371: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 372: warning: s.Len undefined (type *MockSuite has no field or method Len) (ineffassign)
    • Line 373: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 374: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 381: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 382: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 384: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 385: warning: s.Equal undefined (type *MockSuite has no field or method Equal) (ineffassign)
    • Line 415: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 416: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 460: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 461: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 462: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 487: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 488: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • Line 496: warning: s.NoError undefined (type *MockSuite has no field or method NoError) (ineffassign)
    • gocassa/generate.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/gocql/gocql (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/gocql/gocql (invalid package name: "") (ineffassign)
    • gocassa/mock.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/google/btree (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/google/btree (invalid package name: "") (ineffassign)

misspell92%

Misspell Finds commonly misspelled English words