Preparing report...

Report for github.com/smallinsky/mtf

A+    Excellent!    Found 49 issues across 83 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.


golint42%

Golint is a linter for Go source code.

    • mtf/framework/context/testcontext.go
    • Line 16: warning: exported function Get should have comment or be unexported (golint)
    • Line 26: warning: exported type TestContext should have comment or be unexported (golint)
    • Line 36: warning: exported function CreateDirectory should have comment or be unexported (golint)
    • Line 46: warning: exported method TestContext.Clear should have comment or be unexported (golint)
    • Line 50: warning: exported function CreateTestContext should have comment or be unexported (golint)
    • Line 66: warning: exported function RemoveTextContext should have comment or be unexported (golint)
    • Line 72: warning: exported method TestContext.LogReceive should have comment or be unexported (golint)
    • Line 80: warning: exported method TestContext.LogSend should have comment or be unexported (golint)
    • mtf/framework/component/redis/redis.go
    • Line 9: warning: exported type Component should have comment or be unexported (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 31: warning: exported method Component.Start should have comment or be unexported (golint)
    • Line 35: warning: exported method Component.Stop should have comment or be unexported (golint)
    • mtf/framework/environment.go
    • Line 28: warning: exported var GetDockerHostAddr should have comment or be unexported (golint)
    • Line 32: warning: exported type TestEnvironment should have comment or be unexported (golint)
    • Line 42: warning: exported function TestEnv should have comment or be unexported (golint)
    • Line 51: warning: exported method TestEnvironment.Run should have comment or be unexported (golint)
    • Line 80: warning: exported method TestEnvironment.Start should have comment or be unexported (golint)
    • Line 124: warning: exported method TestEnvironment.Stop should have comment or be unexported (golint)
    • Line 135: warning: exported method TestEnvironment.StartSutInCommandMode should have comment or be unexported (golint)
    • Line 143: warning: exported method TestEnvironment.StopSutInCommandMode should have comment or be unexported (golint)
    • Line 154: warning: exported method TestEnvironment.WriteLogs should have comment or be unexported (golint)
    • Line 167: warning: exported method TestEnvironment.WriteComponentLogs should have comment or be unexported (golint)
    • Line 187: warning: exported method TestEnvironment.Prepare should have comment or be unexported (golint)
    • Line 307: warning: exported function GetTLSCertPath should have comment or be unexported (golint)
    • Line 311: warning: exported function GetTLSKeyPath should have comment or be unexported (golint)
    • mtf/framework/component/ftp/ftp.go
    • Line 9: warning: exported type Component should have comment or be unexported (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 31: warning: exported method Component.Start should have comment or be unexported (golint)
    • Line 36: warning: exported method Component.Stop should have comment or be unexported (golint)
    • mtf/match/diff.go
    • Line 9: warning: exported type DiffType should have comment or be unexported (golint)
    • Line 13: warning: exported function Diff should have comment or be unexported (golint)
    • Line 19: warning: exported method DiffType.Match should have comment or be unexported (golint)
    • mtf/pkg/docker/image.go
    • Line 11: warning: exported type PullImageConfig should have comment or be unexported (golint)
    • Line 15: warning: exported method Docker.PullImage should have comment or be unexported (golint)
    • Line 20: warning: exported type BuildImageConfig should have comment or be unexported (golint)
    • Line 25: warning: exported method Docker.BuildImage should have comment or be unexported (golint)
    • mtf/pkg/docker/network.go
    • Line 10: warning: exported type NetworkConfig should have comment or be unexported (golint)
    • Line 16: warning: exported type Network should have comment or be unexported (golint)
    • Line 23: warning: exported function NewNetwork should have comment or be unexported (golint)
    • Line 47: warning: exported method Network.Close should have comment or be unexported (golint)
    • mtf/port/gcp_pubsub.go
    • Line 22: warning: exported function NewPubsub should have comment or be unexported (golint)
    • Line 116: warning: exported type Pubsub should have comment or be unexported (golint)
    • Line 123: warning: exported method Pubsub.Receive should have comment or be unexported (golint)
    • Line 123: warning: receiver name p should be consistent with previous receiver name ps for Pubsub (golint)
    • Line 127: warning: exported method Pubsub.Send should have comment or be unexported (golint)
    • Line 127: warning: receiver name p should be consistent with previous receiver name ps for Pubsub (golint)
    • Line 131: warning: receiver name p should be consistent with previous receiver name ps for Pubsub (golint)
    • Line 142: warning: exported type PubSubSendRequest should have comment or be unexported (golint)
    • Line 147: warning: receiver name p should be consistent with previous receiver name ps for Pubsub (golint)
    • Line 186: warning: receiver name p should be consistent with previous receiver name ps for Pubsub (golint)
    • mtf/port/gcp_storage.go
    • Line 16: warning: exported function NewGCStoragePort should have comment or be unexported (golint)
    • Line 87: warning: exported type GCStorage should have comment or be unexported (golint)
    • Line 92: warning: exported type StorageInsertRequest should have comment or be unexported (golint)
    • Line 98: warning: exported type StorageInsertResponse should have comment or be unexported (golint)
    • Line 101: warning: exported type StorageGetRequest should have comment or be unexported (golint)
    • Line 106: warning: exported type StorageGetResponse should have comment or be unexported (golint)
    • Line 128: warning: exported method GCStorage.Send should have comment or be unexported (golint)
    • Line 132: warning: exported method GCStorage.Receive should have comment or be unexported (golint)
    • mtf/framework/component/migrate/config.go
    • Line 11: warning: exported type MigrateConfig should have comment or be unexported (golint)
    • Line 22: warning: exported method MigrateConfig.Build should have comment or be unexported (golint)
    • Line 38: warning: exported method MigrateConfig.DBConnString should have comment or be unexported (golint)
    • Line 42: warning: exported function BuildContainerConfig should have comment or be unexported (golint)
    • mtf/framework/component/sut/sut.go
    • Line 10: warning: exported type Component should have comment or be unexported (golint)
    • Line 15: warning: exported function New should have comment or be unexported (golint)
    • Line 32: warning: exported method Component.Start should have comment or be unexported (golint)
    • Line 36: warning: exported method Component.Stop should have comment or be unexported (golint)
    • Line 40: warning: exported method Component.Logs should have comment or be unexported (golint)
    • Line 44: warning: exported method Component.Name should have comment or be unexported (golint)
    • mtf/match/func.go
    • Line 11: warning: exported var ErrMatchFnInvalidArg should have comment or be unexported (golint)
    • Line 14: warning: exported type FnType should have comment or be unexported (golint)
    • Line 18: warning: exported function Fn should have comment or be unexported (golint)
    • Line 24: warning: exported method FnType.Match should have comment or be unexported (golint)
    • Line 49: warning: exported method FnType.Validate should have comment or be unexported (golint)
    • mtf/pkg/docker/container.go
    • Line 18: warning: exported type Container should have comment or be unexported (golint)
    • Line 26: warning: exported type WaitPolicy should have comment or be unexported (golint)
    • Line 31: warning: exported type ContainerType should have comment or be unexported (golint)
    • Line 39: warning: exported method ContainerType.Name should have comment or be unexported (golint)
    • Line 43: warning: exported type State should have comment or be unexported (golint)
    • Line 48: warning: exported type ContainerPort should have comment or be unexported (golint)
    • Line 49: warning: exported type HostPort should have comment or be unexported (golint)
    • Line 50: warning: exported type PortMap should have comment or be unexported (golint)
    • Line 52: warning: exported type Mount should have comment or be unexported (golint)
    • Line 57: warning: exported type Mounts should have comment or be unexported (golint)
    • Line 59: warning: exported method ContainerType.Start should have comment or be unexported (golint)
    • Line 71: warning: exported method ContainerType.GetState should have comment or be unexported (golint)
    • Line 82: warning: exported method ContainerType.WaitForReady should have comment or be unexported (golint)
    • Line 104: warning: exported method ContainerType.GetStateV2 should have comment or be unexported (golint)
    • Line 115: warning: exported method ContainerType.WaitForStatusHealthly should have comment or be unexported (golint)
    • Line 136: warning: exported method ContainerType.Stop should have comment or be unexported (golint)
    • Line 147: warning: exported method ContainerType.Logs should have comment or be unexported (golint)
    • mtf/port/grpc_server.go
    • Line 29: warning: exported type PortIn should have comment or be unexported (golint)
    • Line 34: warning: exported method PortIn.Send should have comment or be unexported (golint)
    • Line 38: warning: exported method PortIn.Receive should have comment or be unexported (golint)
    • Line 42: warning: exported function NewGRPCServersPort should have comment or be unexported (golint)
    • Line 52: warning: exported function NewGRPCServerPort should have comment or be unexported (golint)
    • Line 62: warning: exported function NewGRPCServers should have comment or be unexported (golint)
    • Line 101: warning: exported function NewGRPCServer should have comment or be unexported (golint)
    • Line 165: warning: exported type GRPCErr should have comment or be unexported (golint)
    • mtf/port/options.go
    • Line 10: warning: exported type Opt should have comment or be unexported (golint)
    • Line 12: warning: exported function WithError should have comment or be unexported (golint)
    • Line 18: warning: exported function WithT should have comment or be unexported (golint)
    • Line 24: warning: exported function WithTimeout should have comment or be unexported (golint)
    • Line 43: warning: exported type PortOpt should have comment or be unexported (golint)
    • Line 45: warning: exported function WithTLS should have comment or be unexported (golint)
    • mtf/framework/component/mysql/mysql.go
    • Line 9: warning: exported type Component should have comment or be unexported (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 31: warning: exported method Component.Start should have comment or be unexported (golint)
    • Line 35: warning: exported method Component.Stop should have comment or be unexported (golint)
    • mtf/framework/component/pubsub/pubsub.go
    • Line 12: warning: exported type Component should have comment or be unexported (golint)
    • Line 17: warning: exported function New should have comment or be unexported (golint)
    • Line 34: warning: exported method Component.Start should have comment or be unexported (golint)
    • Line 86: warning: exported method Component.Stop should have comment or be unexported (golint)
    • mtf/framework/component/migrate/migrate.go
    • Line 16: warning: exported type Component should have comment or be unexported (golint)
    • Line 21: warning: exported function New should have comment or be unexported (golint)
    • Line 38: warning: exported method Component.Start should have comment or be unexported (golint)
    • Line 66: warning: exported method Component.Stop should have comment or be unexported (golint)
    • mtf/framework/settings.go
    • Line 3: warning: exported type Settings should have comment or be unexported (golint)
    • Line 13: warning: exported type MigrationSettings should have comment or be unexported (golint)
    • Line 20: warning: exported type MysqlSettings should have comment or be unexported (golint)
    • Line 63: warning: exported type PubSubSettings should have comment or be unexported (golint)
    • Line 68: warning: exported type TopicSubscriptions should have comment or be unexported (golint)
    • Line 73: warning: exported type RedisSettings should have comment or be unexported (golint)
    • Line 78: warning: exported type FTPSettings should have comment or be unexported (golint)
    • Line 90: warning: exported method TestEnvironment.WithMySQL should have comment or be unexported (golint)
    • Line 95: warning: exported method TestEnvironment.WithMigration should have comment or be unexported (golint)
    • Line 100: warning: exported method TestEnvironment.WithSUT should have comment or be unexported (golint)
    • Line 105: warning: exported method TestEnvironment.WithPubSub should have comment or be unexported (golint)
    • Line 110: warning: exported method TestEnvironment.WithRedis should have comment or be unexported (golint)
    • Line 115: warning: exported method TestEnvironment.WithFTP should have comment or be unexported (golint)
    • Line 120: warning: exported method TestEnvironment.WithTLS should have comment or be unexported (golint)
    • mtf/framework/suite.go
    • Line 13: warning: exported type Initable should have comment or be unexported (golint)
    • Line 17: warning: exported function Run should have comment or be unexported (golint)
    • mtf/pkg/docker/docker.go
    • Line 16: warning: exported function New should have comment or be unexported (golint)
    • Line 26: warning: exported type Docker should have comment or be unexported (golint)
    • Line 48: warning: comment on exported method Docker.ContainerExists should be of the form "ContainerExists ..." (golint)
    • Line 62: warning: exported method Docker.RemoveContainer should have comment or be unexported (golint)
    • Line 68: warning: exported type ContainerConfig should have comment or be unexported (golint)
    • Line 88: warning: exported type HealthCheckConfig should have comment or be unexported (golint)
    • Line 95: warning: exported method Docker.NewContainer should have comment or be unexported (golint)
    • Line 186: warning: exported method Docker.CreateNetwork should have comment or be unexported (golint)
    • Line 209: warning: exported method Network.Remove should have comment or be unexported (golint)
    • mtf/pkg/cert/cert.go
    • Line 22: warning: exported var ServerCertFile should have comment or be unexported (golint)
    • Line 37: warning: exported type CertKey should have comment or be unexported (golint)
    • Line 42: warning: exported function GenCert should have comment or be unexported (golint)
    • Line 107: warning: exported function WriteCert should have comment or be unexported (golint)
    • mtf/fake/fakegcs/gcs.go
    • Line 14: warning: exported var StorageHost should have comment or be unexported (golint)
    • Line 19: warning: exported type GCStorage should have comment or be unexported (golint)
    • Line 110: warning: exported method GCStorage.AddMuxRoute should have comment or be unexported (golint)
    • Line 118: warning: exported type BucketObject should have comment or be unexported (golint)
    • mtf/port/grpc_client.go
    • Line 15: warning: exported type EndpointRespTypePair should have comment or be unexported (golint)
    • Line 20: warning: exported type MsgTypeMap should have comment or be unexported (golint)
    • Line 22: warning: exported function NewGRPCClient should have comment or be unexported (golint)
    • Line 48: warning: exported function NewGRPCClientPort should have comment or be unexported (golint)
    • Line 63: warning: exported type ClientPort should have comment or be unexported (golint)
    • Line 95: warning: exported method ClientPort.Close should have comment or be unexported (golint)
    • Line 104: warning: exported method ClientPort.Receive should have comment or be unexported (golint)
    • Line 108: warning: exported method ClientPort.Send should have comment or be unexported (golint)
    • mtf/port/ftp.go
    • Line 17: warning: exported type FTPPort should have comment or be unexported (golint)
    • Line 22: warning: exported function NewFTPPort should have comment or be unexported (golint)
    • Line 33: warning: exported function NewFTP should have comment or be unexported (golint)
    • Line 57: warning: exported type FTPEvent should have comment or be unexported (golint)
    • Line 62: warning: exported method FTPPort.Send should have comment or be unexported (golint)
    • Line 75: warning: exported method FTPPort.Receive should have comment or be unexported (golint)
    • mtf/framework/component/pubsub/config.go
    • Line 7: warning: exported type Config should have comment or be unexported (golint)
    • Line 12: warning: exported type TopicSubscriptions should have comment or be unexported (golint)
    • Line 17: warning: exported function BuildContainerConfig should have comment or be unexported (golint)
    • mtf/match/payload.go
    • Line 10: warning: exported type PayloadMatcher should have comment or be unexported (golint)
    • Line 14: warning: exported function Payload should have comment or be unexported (golint)
    • Line 20: warning: exported method PayloadMatcher.Validate should have comment or be unexported (golint)
    • Line 24: warning: exported method PayloadMatcher.Match should have comment or be unexported (golint)
    • mtf/pkg/fswatch/watcher.go
    • Line 10: warning: exported function New should have comment or be unexported (golint)
    • Line 18: warning: exported type EventHandler should have comment or be unexported (golint)
    • mtf/match/any.go
    • Line 9: warning: exported type TypeT should have comment or be unexported (golint)
    • Line 13: warning: exported function Type should have comment or be unexported (golint)
    • Line 19: warning: exported method TypeT.Match should have comment or be unexported (golint)
    • mtf/match/proto_equal.go
    • Line 10: warning: exported type ProtoEqualType should have comment or be unexported (golint)
    • Line 14: warning: exported function ProtoEqual should have comment or be unexported (golint)
    • Line 20: warning: exported method ProtoEqualType.Match should have comment or be unexported (golint)
    • mtf/pkg/docker/wait.go
    • Line 12: warning: exported type MultiWaitPolicy should have comment or be unexported (golint)
    • Line 16: warning: exported method MultiWaitPolicy.WaitForIt should have comment or be unexported (golint)
    • Line 25: warning: exported type WaitForIt should have comment or be unexported (golint)
    • Line 29: warning: exported type WaitForProcess should have comment or be unexported (golint)
    • Line 33: warning: exported method WaitForProcess.WaitForIt should have comment or be unexported (golint)
    • Line 45: warning: exported type WaitWithDeley should have comment or be unexported (golint)
    • Line 49: warning: exported method WaitWithDeley.WaitForIt should have comment or be unexported (golint)
    • Line 54: warning: exported type WaitForPort should have comment or be unexported (golint)
    • Line 58: warning: exported method WaitForPort.WaitForIt should have comment or be unexported (golint)
    • Line 70: warning: exported type WaitForCommand should have comment or be unexported (golint)
    • Line 74: warning: exported method WaitForCommand.WaitForIt should have comment or be unexported (golint)
    • mtf/pkg/exec/exec.go
    • Line 9: warning: exported type Option should have comment or be unexported (golint)
    • Line 11: warning: exported function WithEnv should have comment or be unexported (golint)
    • Line 17: warning: exported function Run should have comment or be unexported (golint)
    • mtf/match/deep_equal.go
    • Line 10: warning: exported type DeepEqualType should have comment or be unexported (golint)
    • Line 14: warning: exported function DeepEqual should have comment or be unexported (golint)
    • Line 20: warning: exported method DeepEqualType.Match should have comment or be unexported (golint)
    • mtf/match/grpc_err.go
    • Line 11: warning: exported type GRPCErrType should have comment or be unexported (golint)
    • Line 16: warning: exported function GRPCErr should have comment or be unexported (golint)
    • Line 23: warning: exported function GRPCStatusCode should have comment or be unexported (golint)
    • Line 29: warning: exported method GRPCErrType.Match should have comment or be unexported (golint)
    • mtf/port/http_default_hanlder.go
    • Line 14: warning: exported function NewHTTPPort should have comment or be unexported (golint)
    • Line 21: warning: exported function NewGCSPort should have comment or be unexported (golint)
    • Line 34: warning: exported type HTTPPort should have comment or be unexported (golint)
    • Line 40: warning: exported type HTTPRequest should have comment or be unexported (golint)
    • Line 48: warning: exported type HTTPResponse should have comment or be unexported (golint)
    • Line 84: warning: exported method HTTPPort.Register should have comment or be unexported (golint)
    • Line 123: warning: exported method HTTPPort.Send should have comment or be unexported (golint)
    • Line 131: warning: exported method HTTPPort.Receive should have comment or be unexported (golint)
    • mtf/port/port.go
    • Line 13: warning: exported type PortImpl should have comment or be unexported (golint)
    • Line 18: warning: exported type Port should have comment or be unexported (golint)
    • Line 26: warning: exported type SendOption should have comment or be unexported (golint)
    • Line 28: warning: exported function WithCtx should have comment or be unexported (golint)
    • Line 34: warning: exported method Port.Send should have comment or be unexported (golint)
    • Line 59: warning: exported method Port.Receive should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!