Preparing report...

Report for github.com/qa-dev/jsonwire-grid

A+    Excellent!    Found 29 issues across 65 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!


gocyclo98%

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.


golint56%

Golint is a linter for Go source code.

    • jsonwire-grid/pool/node.go
    • Line 5: warning: exported type NodeStatus should have comment or be unexported (golint)
    • Line 8: warning: exported const NodeStatusAvailable should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type NodeType should have comment or be unexported (golint)
    • Line 16: warning: exported const NodeTypePersistent should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Node should have comment or be unexported (golint)
    • Line 39: warning: exported function NewNode should have comment or be unexported (golint)
    • jsonwire-grid/middleware/wrap.go
    • Line 10: warning: exported type Wrap should have comment or be unexported (golint)
    • Line 15: warning: exported function NewWrap should have comment or be unexported (golint)
    • Line 22: warning: exported method Wrap.Add should have comment or be unexported (golint)
    • Line 26: warning: exported method Wrap.Do should have comment or be unexported (golint)
    • jsonwire-grid/storage/tests/comon.go
    • Line 15: warning: comment on exported type PrepareInterface should be of the form "PrepareInterface ..." (with optional leading article) (golint)
    • Line 39: warning: don't use underscores in Go names; func TestStorage_Add should be TestStorageAdd (golint)
    • Line 73: warning: don't use underscores in Go names; func TestStorage_Add_Repeat should be TestStorageAddRepeat (golint)
    • Line 95: warning: don't use underscores in Go names; func TestStorage_Add_Limit_Overflow should be TestStorageAddLimitOverflow (golint)
    • Line 117: warning: don't use underscores in Go names; func TestStorage_GetAll should be TestStorageGetAll (golint)
    • Line 157: warning: don't use underscores in Go names; func TestStorage_GetByAddress should be TestStorageGetByAddress (golint)
    • Line 178: warning: don't use underscores in Go names; func TestStorage_GetBySession should be TestStorageGetBySession (golint)
    • Line 200: warning: don't use underscores in Go names; func TestStorage_GetCountWithStatus should be TestStorageGetCountWithStatus (golint)
    • Line 223: warning: don't use underscores in Go names; func TestStorage_Remove should be TestStorageRemove (golint)
    • Line 239: warning: don't use underscores in Go names; func TestStorage_ReserveAvailable_Positive should be TestStorageReserveAvailablePositive (golint)
    • Line 265: warning: don't use underscores in Go names; func TestStorage_ReserveAvailable_Negative should be TestStorageReserveAvailableNegative (golint)
    • Line 279: warning: don't use underscores in Go names; func TestStorage_SetAvailable should be TestStorageSetAvailable (golint)
    • Line 298: warning: don't use underscores in Go names; func TestStorage_SetBusy should be TestStorageSetBusy (golint)
    • Line 319: warning: don't use underscores in Go names; func TestStorage_UpdateAdderss_UpdatesValue should be TestStorageUpdateAdderssUpdatesValue (golint)
    • Line 339: warning: don't use underscores in Go names; func TestStorage_UpdateAdderss_ReturnsErrNotFound should be TestStorageUpdateAdderssReturnsErrNotFound (golint)
    • jsonwire-grid/selenium/client.go
    • Line 15: warning: exported type Client should have comment or be unexported (golint)
    • Line 23: warning: exported type HTTPMethod should have comment or be unexported (golint)
    • Line 26: warning: exported const PROTOCOL should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type ClientFactory should have comment or be unexported (golint)
    • Line 31: warning: exported method ClientFactory.Create should have comment or be unexported (golint)
    • Line 35: warning: exported method Client.Address should have comment or be unexported (golint)
    • Line 39: warning: exported method Client.Sessions should have comment or be unexported (golint)
    • Line 57: warning: exported method Client.Health should have comment or be unexported (golint)
    • Line 75: warning: exported method Client.CloseSession should have comment or be unexported (golint)
    • jsonwire-grid/wda/client.go
    • Line 15: warning: exported type Client should have comment or be unexported (golint)
    • Line 23: warning: exported type HTTPMethod should have comment or be unexported (golint)
    • Line 26: warning: exported const PROTOCOL should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type ClientFactory should have comment or be unexported (golint)
    • Line 31: warning: exported method ClientFactory.Create should have comment or be unexported (golint)
    • Line 35: warning: exported method Client.Address should have comment or be unexported (golint)
    • Line 39: warning: exported method Client.Sessions should have comment or be unexported (golint)
    • Line 44: warning: exported method Client.Health should have comment or be unexported (golint)
    • Line 62: warning: exported method Client.CloseSession should have comment or be unexported (golint)
    • jsonwire-grid/pool/strategy/kubernetes/strategy.go
    • Line 15: warning: exported type Strategy should have comment or be unexported (golint)
    • Line 24: warning: exported method Strategy.Reserve should have comment or be unexported (golint)
    • Line 53: warning: exported method Strategy.CleanUp should have comment or be unexported (golint)
    • Line 71: warning: exported method Strategy.FixNodeStatus should have comment or be unexported (golint)
    • jsonwire-grid/pool/strategy/persistent/strategy.go
    • Line 22: warning: exported type Strategy should have comment or be unexported (golint)
    • Line 29: warning: exported method Strategy.Reserve should have comment or be unexported (golint)
    • Line 77: warning: exported method Strategy.CleanUp should have comment or be unexported (golint)
    • Line 88: warning: exported method Strategy.FixNodeStatus should have comment or be unexported (golint)
    • jsonwire-grid/proxy/transport.go
    • Line 17: warning: exported type CreateSessionTransport should have comment or be unexported (golint)
    • Line 24: warning: exported function NewCreateSessionTransport should have comment or be unexported (golint)
    • Line 28: warning: exported method CreateSessionTransport.RoundTrip should have comment or be unexported (golint)
    • jsonwire-grid/storage/mysql/factory.go
    • Line 6: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 16: warning: exported type Factory should have comment or be unexported (golint)
    • Line 19: warning: exported method Factory.Create should have comment or be unexported (golint)
    • jsonwire-grid/invoke.go
    • Line 23: warning: exported type StorageFactoryInterface should have comment or be unexported (golint)
    • Line 27: warning: exported type StrategyFactoryInterface should have comment or be unexported (golint)
    • jsonwire-grid/storage/local/storage.go
    • Line 12: warning: exported type Storage should have comment or be unexported (golint)
    • Line 17: warning: exported method Storage.Add should have comment or be unexported (golint)
    • Line 36: warning: exported method Storage.ReserveAvailable should have comment or be unexported (golint)
    • Line 50: warning: exported method Storage.SetBusy should have comment or be unexported (golint)
    • Line 63: warning: exported method Storage.SetAvailable should have comment or be unexported (golint)
    • Line 75: warning: exported method Storage.GetCountWithStatus should have comment or be unexported (golint)
    • Line 90: warning: exported method Storage.GetBySession should have comment or be unexported (golint)
    • Line 101: warning: exported method Storage.GetByAddress should have comment or be unexported (golint)
    • Line 112: warning: exported method Storage.GetAll should have comment or be unexported (golint)
    • Line 123: warning: exported method Storage.Remove should have comment or be unexported (golint)
    • Line 134: warning: exported method Storage.UpdateAddress should have comment or be unexported (golint)
    • jsonwire-grid/pool/mocks.go
    • Line 9: warning: exported type StorageMock should have comment or be unexported (golint)
    • Line 13: warning: exported method StorageMock.Add should have comment or be unexported (golint)
    • Line 18: warning: exported method StorageMock.ReserveAvailable should have comment or be unexported (golint)
    • Line 23: warning: exported method StorageMock.SetBusy should have comment or be unexported (golint)
    • Line 28: warning: exported method StorageMock.SetAvailable should have comment or be unexported (golint)
    • Line 33: warning: exported method StorageMock.GetCountWithStatus should have comment or be unexported (golint)
    • Line 38: warning: exported method StorageMock.GetBySession should have comment or be unexported (golint)
    • Line 43: warning: exported method StorageMock.GetByAddress should have comment or be unexported (golint)
    • Line 48: warning: exported method StorageMock.GetAll should have comment or be unexported (golint)
    • Line 53: warning: exported method StorageMock.Remove should have comment or be unexported (golint)
    • Line 58: warning: exported type StrategyListMock should have comment or be unexported (golint)
    • Line 62: warning: exported method StrategyListMock.Reserve should have comment or be unexported (golint)
    • Line 67: warning: exported method StrategyListMock.CleanUp should have comment or be unexported (golint)
    • Line 72: warning: exported method StrategyListMock.FixNodeStatus should have comment or be unexported (golint)
    • Line 77: warning: exported method StorageMock.UpdateAddress should have comment or be unexported (golint)
    • jsonwire-grid/pool/strategyList.go
    • Line 10: warning: exported type StrategyListInterface should have comment or be unexported (golint)
    • Line 16: warning: exported type StrategyList should have comment or be unexported (golint)
    • Line 20: warning: exported function NewStrategyList should have comment or be unexported (golint)
    • Line 24: warning: exported method StrategyList.Reserve should have comment or be unexported (golint)
    • Line 36: warning: exported method StrategyList.CleanUp should have comment or be unexported (golint)
    • Line 48: warning: exported method StrategyList.FixNodeStatus should have comment or be unexported (golint)
    • jsonwire-grid/proxy/response.go
    • Line 5: warning: exported type ResponseWriter should have comment or be unexported (golint)
    • Line 11: warning: exported function NewResponseWriter should have comment or be unexported (golint)
    • Line 15: warning: exported method ResponseWriter.Header should have comment or be unexported (golint)
    • Line 32: warning: exported method ResponseWriter.WriteHeader should have comment or be unexported (golint)
    • jsonwire-grid/storage/mysql/storage.go
    • Line 16: warning: exported type MysqlNodeModel should have comment or be unexported (golint)
    • Line 27: warning: exported type MysqlCapabilitiesModel should have comment or be unexported (golint)
    • Line 35: warning: exported type MysqlStorage should have comment or be unexported (golint)
    • Line 39: warning: exported function NewMysqlStorage should have comment or be unexported (golint)
    • Line 43: warning: exported method MysqlStorage.Add should have comment or be unexported (golint)
    • Line 123: warning: exported method MysqlStorage.ReserveAvailable should have comment or be unexported (golint)
    • Line 185: warning: exported method MysqlStorage.SetBusy should have comment or be unexported (golint)
    • Line 206: warning: exported method MysqlStorage.SetAvailable should have comment or be unexported (golint)
    • Line 228: warning: exported method MysqlStorage.GetCountWithStatus should have comment or be unexported (golint)
    • Line 246: warning: exported method MysqlStorage.GetBySession should have comment or be unexported (golint)
    • Line 255: warning: exported method MysqlStorage.GetByAddress should have comment or be unexported (golint)
    • Line 265: warning: exported method MysqlStorage.GetAll should have comment or be unexported (golint)
    • Line 311: warning: exported method MysqlStorage.Remove should have comment or be unexported (golint)
    • Line 337: warning: exported method MysqlStorage.UpdateAddress should have comment or be unexported (golint)
    • jsonwire-grid/storage/mongo/mongo.go
    • Line 16: warning: exported type Storage should have comment or be unexported (golint)
    • Line 21: warning: exported function NewMongoStorage should have comment or be unexported (golint)
    • Line 28: warning: exported method Storage.Add should have comment or be unexported (golint)
    • Line 48: warning: exported method Storage.ReserveAvailable should have comment or be unexported (golint)
    • Line 75: warning: exported method Storage.SetBusy should have comment or be unexported (golint)
    • Line 93: warning: exported method Storage.SetAvailable should have comment or be unexported (golint)
    • Line 110: warning: exported method Storage.GetCountWithStatus should have comment or be unexported (golint)
    • Line 125: warning: exported method Storage.GetBySession should have comment or be unexported (golint)
    • Line 133: warning: exported method Storage.GetByAddress should have comment or be unexported (golint)
    • Line 141: warning: exported method Storage.GetAll should have comment or be unexported (golint)
    • Line 162: warning: exported method Storage.Remove should have comment or be unexported (golint)
    • Line 173: warning: exported method Storage.UpdateAddress should have comment or be unexported (golint)
    • jsonwire-grid/jsonwire/response.go
    • Line 8: warning: exported type ResponseStatus should have comment or be unexported (golint)
    • Line 11: warning: exported const ResponseStatusSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type Response should have comment or be unexported (golint)
    • Line 21: warning: exported function NewResponse should have comment or be unexported (golint)
    • Line 25: warning: exported function JSONResponse should have comment or be unexported (golint)
    • jsonwire-grid/pool/pool.go
    • Line 20: warning: exported type StorageInterface should have comment or be unexported (golint)
    • Line 33: warning: exported type StrategyInterface should have comment or be unexported (golint)
    • Line 39: warning: exported type Pool should have comment or be unexported (golint)
    • Line 46: warning: exported function NewPool should have comment or be unexported (golint)
    • Line 55: warning: exported method Pool.SetBusyNodeDuration should have comment or be unexported (golint)
    • Line 59: warning: exported method Pool.SetReservedNodeDuration should have comment or be unexported (golint)
    • Line 63: warning: comment on exported method Pool.ReserveAvailableNode should be of the form "ReserveAvailableNode ..." (golint)
    • Line 74: warning: exported method Pool.Add should have comment or be unexported (golint)
    • Line 82: warning: exported method Pool.RegisterSession should have comment or be unexported (golint)
    • Line 86: warning: exported method Pool.GetAll should have comment or be unexported (golint)
    • Line 90: warning: exported method Pool.GetNodeBySessionID should have comment or be unexported (golint)
    • Line 100: warning: exported method Pool.GetNodeByAddress should have comment or be unexported (golint)
    • Line 110: warning: exported method Pool.CleanUpNode should have comment or be unexported (golint)
    • Line 119: warning: comment on exported method Pool.Remove should be of the form "Remove ..." (golint)
    • Line 130: warning: exported method Pool.CountNodes should have comment or be unexported (golint)
    • Line 140: warning: exported method Pool.FixNodeStatuses 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!