Preparing report...

Report for github.com/appscode/service-broker

A+    Excellent!    Found 24 issues across 31 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!


gocyclo100%

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.

No problems detected. Good job!


golint25%

Golint is a linter for Go source code.

    • service-broker/pkg/kubedb/mongodb.go
    • Line 20: warning: exported type MongoDbProvider should have comment or be unexported (golint)
    • Line 24: warning: exported function NewMongoDbProvider should have comment or be unexported (golint)
    • Line 48: warning: exported method MongoDbProvider.Metadata should have comment or be unexported (golint)
    • Line 52: warning: exported method MongoDbProvider.Create should have comment or be unexported (golint)
    • Line 78: warning: exported method MongoDbProvider.Delete should have comment or be unexported (golint)
    • Line 102: warning: exported method MongoDbProvider.Bind should have comment or be unexported (golint)
    • Line 142: warning: exported method MongoDbProvider.GetProvisionInfo should have comment or be unexported (golint)
    • service-broker/pkg/cmds/server/options.go
    • Line 11: warning: exported type ExtraOptions should have comment or be unexported (golint)
    • Line 21: warning: exported function NewExtraOptions should have comment or be unexported (golint)
    • Line 31: warning: exported method ExtraOptions.AddFlags should have comment or be unexported (golint)
    • Line 43: warning: exported method ExtraOptions.ApplyTo should have comment or be unexported (golint)
    • service-broker/pkg/kubedb/broker.go
    • Line 20: warning: exported type Client should have comment or be unexported (golint)
    • Line 27: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 42: warning: exported method Client.GetCatalog should have comment or be unexported (golint)
    • Line 68: warning: exported method Client.Provision should have comment or be unexported (golint)
    • Line 84: warning: exported method Client.GetProvisionInfo should have comment or be unexported (golint)
    • Line 93: warning: exported method Client.Bind should have comment or be unexported (golint)
    • Line 145: warning: exported method Client.Deprovision should have comment or be unexported (golint)
    • service-broker/pkg/kubedb/elasticsearch.go
    • Line 20: warning: exported type ElasticsearchProvider should have comment or be unexported (golint)
    • Line 24: warning: exported function NewElasticsearchProvider should have comment or be unexported (golint)
    • Line 63: warning: exported method ElasticsearchProvider.Metadata should have comment or be unexported (golint)
    • Line 67: warning: exported method ElasticsearchProvider.Create should have comment or be unexported (golint)
    • Line 93: warning: exported method ElasticsearchProvider.Delete should have comment or be unexported (golint)
    • Line 117: warning: exported method ElasticsearchProvider.Bind should have comment or be unexported (golint)
    • Line 163: warning: exported method ElasticsearchProvider.GetProvisionInfo should have comment or be unexported (golint)
    • service-broker/pkg/kubedb/memcached.go
    • Line 22: warning: exported type MemcachedProvider should have comment or be unexported (golint)
    • Line 26: warning: exported function NewMemcachedProvider should have comment or be unexported (golint)
    • Line 54: warning: exported method MemcachedProvider.Metadata should have comment or be unexported (golint)
    • Line 58: warning: exported method MemcachedProvider.Create should have comment or be unexported (golint)
    • Line 82: warning: exported method MemcachedProvider.Delete should have comment or be unexported (golint)
    • Line 106: warning: exported method MemcachedProvider.Bind should have comment or be unexported (golint)
    • Line 134: warning: exported method MemcachedProvider.GetProvisionInfo should have comment or be unexported (golint)
    • service-broker/pkg/kubedb/mysql.go
    • Line 19: warning: exported type MySQLProvider should have comment or be unexported (golint)
    • Line 23: warning: exported function NewMySQLProvider should have comment or be unexported (golint)
    • Line 37: warning: exported method MySQLProvider.Metadata should have comment or be unexported (golint)
    • Line 41: warning: exported method MySQLProvider.Create should have comment or be unexported (golint)
    • Line 65: warning: exported method MySQLProvider.Delete should have comment or be unexported (golint)
    • Line 89: warning: exported method MySQLProvider.Bind should have comment or be unexported (golint)
    • Line 129: warning: exported method MySQLProvider.GetProvisionInfo should have comment or be unexported (golint)
    • service-broker/pkg/kubedb/redis.go
    • Line 19: warning: exported type RedisProvider should have comment or be unexported (golint)
    • Line 23: warning: exported function NewRedisProvider should have comment or be unexported (golint)
    • Line 37: warning: exported method RedisProvider.Metadata should have comment or be unexported (golint)
    • Line 41: warning: exported method RedisProvider.Create should have comment or be unexported (golint)
    • Line 65: warning: exported method RedisProvider.Delete should have comment or be unexported (golint)
    • Line 89: warning: exported method RedisProvider.Bind should have comment or be unexported (golint)
    • Line 117: warning: exported method RedisProvider.GetProvisionInfo should have comment or be unexported (golint)
    • service-broker/pkg/cmds/server/start.go
    • Line 20: warning: exported type BrokerServerOptions should have comment or be unexported (golint)
    • Line 28: warning: exported function NewBrokerServerOptions should have comment or be unexported (golint)
    • Line 46: warning: exported method BrokerServerOptions.AddFlags should have comment or be unexported (golint)
    • Line 51: warning: exported method BrokerServerOptions.Validate should have comment or be unexported (golint)
    • Line 55: warning: exported method BrokerServerOptions.Complete should have comment or be unexported (golint)
    • Line 59: warning: exported method BrokerServerOptions.Config should have comment or be unexported (golint)
    • Line 85: warning: exported method BrokerServerOptions.Run should have comment or be unexported (golint)
    • service-broker/test/e2e/framework/test_context.go
    • Line 12: warning: exported const RecommendedConfigPathEnvVar should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type TestContextType should have comment or be unexported (golint)
    • Line 24: warning: exported var TestContext should have comment or be unexported (golint)
    • Line 26: warning: comment on exported function RegisterCommonFlags should be of the form "RegisterCommonFlags ..." (golint)
    • Line 45: warning: exported function RegisterParseFlags should have comment or be unexported (golint)
    • service-broker/pkg/broker/broker.go
    • Line 39: warning: exported method Broker.GetCatalog should have comment or be unexported (golint)
    • Line 53: warning: exported method Broker.Provision should have comment or be unexported (golint)
    • Line 104: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 130: warning: exported method Broker.Deprovision should have comment or be unexported (golint)
    • Line 160: warning: exported method Broker.LastOperation should have comment or be unexported (golint)
    • Line 166: warning: exported method Broker.Bind should have comment or be unexported (golint)
    • Line 198: warning: exported method Broker.Unbind should have comment or be unexported (golint)
    • Line 211: warning: exported method Broker.Update should have comment or be unexported (golint)
    • Line 222: warning: exported method Broker.ValidateBrokerAPIVersion should have comment or be unexported (golint)
    • service-broker/pkg/kubedb/constants.go
    • Line 4: warning: comment on exported const InstanceKey should be of the form "InstanceKey ..." (golint)
    • Line 7: warning: comment on exported const ProvisionInfoKey should be of the form "ProvisionInfoKey ..." (golint)
    • Line 10: warning: comment on exported const NamespaceFilePath should be of the form "NamespaceFilePath ..." (golint)
    • Line 16: warning: comment on exported const KubeDBServiceElasticsearch should be of the form "KubeDBServiceElasticsearch ..." (golint)
    • Line 18: warning: exported const KubeDBServiceMemcached should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported const PlanElasticSearchDemo should be of the form "PlanElasticSearchDemo ..." (golint)
    • service-broker/pkg/kubedb/postgres.go
    • Line 20: warning: exported type PostgreSQLProvider should have comment or be unexported (golint)
    • Line 25: warning: exported function NewPostgreSQLProvider should have comment or be unexported (golint)
    • Line 47: warning: exported method PostgreSQLProvider.Metadata should have comment or be unexported (golint)
    • Line 51: warning: exported method PostgreSQLProvider.Create should have comment or be unexported (golint)
    • Line 77: warning: exported method PostgreSQLProvider.Delete should have comment or be unexported (golint)
    • Line 101: warning: exported method PostgreSQLProvider.Bind should have comment or be unexported (golint)
    • Line 141: warning: exported method PostgreSQLProvider.GetProvisionInfo should have comment or be unexported (golint)
    • service-broker/pkg/kubedb/provider.go
    • Line 13: warning: exported type Provider should have comment or be unexported (golint)
    • Line 21: warning: exported type ProvisionInfo should have comment or be unexported (golint)
    • Line 41: warning: exported method ProvisionInfo.Match should have comment or be unexported (golint)
    • Line 76: 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 90: warning: comment on exported type Credentials should be of the form "Credentials ..." (with optional leading article) (golint)
    • service-broker/pkg/server/server.go
    • Line 20: warning: exported var Scheme should have comment or be unexported (golint)
    • Line 40: warning: exported type BrokerServerConfig should have comment or be unexported (golint)
    • Line 50: warning: exported method BrokerServer.Run should have comment or be unexported (golint)
    • Line 59: warning: exported type CompletedConfig should have comment or be unexported (golint)
    • service-broker/test/e2e/framework/util.go
    • Line 9: warning: should not use dot imports (golint)
    • Line 10: warning: should not use dot imports (golint)
    • Line 23: warning: comment on exported const Poll should be of the form "Poll ..." (golint)
    • Line 29: warning: comment on exported const EndpointRegisterTimeout should be of the form "EndpointRegisterTimeout ..." (golint)
    • Line 41: warning: exported function Logf should have comment or be unexported (golint)
    • Line 45: warning: exported function Failf should have comment or be unexported (golint)
    • Line 51: warning: exported function Skipf should have comment or be unexported (golint)
    • Line 57: warning: exported type ClientConfigGetter should have comment or be unexported (golint)
    • Line 59: warning: comment on exported var RunId should be of the form "RunId ..." (golint)
    • Line 74: warning: exported function CreateKubeNamespace should have comment or be unexported (golint)
    • Line 98: warning: exported function DeleteKubeNamespace should have comment or be unexported (golint)
    • Line 102: warning: exported function ExpectNoError should have comment or be unexported (golint)
    • Line 109: warning: exported function WaitForCreatingSecret should have comment or be unexported (golint)
    • Line 120: warning: exported function GetBrokerPod should have comment or be unexported (golint)
    • Line 148: warning: comment on exported function WaitForPodRunningInNamespace should be of the form "WaitForPodRunningInNamespace ..." (golint)
    • Line 178: warning: exported function WaitForEndpoint should have comment or be unexported (golint)
    • service-broker/pkg/broker/config.go
    • Line 16: warning: exported type Config should have comment or be unexported (golint)
    • Line 24: warning: exported function NewConfig should have comment or be unexported (golint)
    • Line 30: warning: exported method Config.New should have comment or be unexported (golint)
    • service-broker/test/e2e/util.go
    • Line 15: warning: exported function Int32Ptr should have comment or be unexported (golint)
    • Line 29: warning: exported function NewCatalogConfigMap should have comment or be unexported (golint)
    • Line 79: warning: exported function NewServiceBrokerDeployment should have comment or be unexported (golint)
    • Line 157: warning: exported function NewServiceBrokerService should have comment or be unexported (golint)
    • Line 175: warning: exported function NewServiceBrokerServiceAccount should have comment or be unexported (golint)
    • Line 181: warning: exported function NewServiceBrokerClusterRoleBinding should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!