Preparing report...

Report for github.com/SUSE/stratos

(v2.0.0-beta-001+incompatible)

A+    Excellent!    Found 62 issues across 279 files

Tweet

gofmt99%

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!


gocyclo90%

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.


golint88%

Golint is a linter for Go source code.

    • src/backend/app-core/datastore/20170818120003_InitialSchema.go
    • Line 11: warning: comment on exported method StratosMigrations.Up_20170818120003 should be of the form "Up_20170818120003 ..." (golint)
    • Line 12: warning: don't use underscores in Go names; method Up_20170818120003 should be Up20170818120003 (golint)
    • Line 84: warning: comment on exported function Down_20170818120003 should be of the form "Down_20170818120003 ..." (golint)
    • Line 85: warning: don't use underscores in Go names; func Down_20170818120003 should be Down20170818120003 (golint)
    • src/backend/app-core/datastore/20170829154900_TokenDisconnected.go
    • Line 10: warning: comment on exported method StratosMigrations.Up_20170829154900 should be of the form "Up_20170829154900 ..." (golint)
    • Line 11: warning: don't use underscores in Go names; method Up_20170829154900 should be Up20170829154900 (golint)
    • Line 21: warning: comment on exported function Down_20170829154900 should be of the form "Down_20170829154900 ..." (golint)
    • Line 22: warning: don't use underscores in Go names; func Down_20170829154900 should be Down20170829154900 (golint)
    • src/backend/cloudfoundry/main.go
    • Line 19: warning: exported type CloudFoundrySpecification should have comment or be unexported (golint)
    • Line 25: warning: exported const EndpointType should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported function Init should have comment or be unexported (golint)
    • Line 33: warning: exported method CloudFoundrySpecification.GetEndpointPlugin should have comment or be unexported (golint)
    • Line 37: warning: exported method CloudFoundrySpecification.GetRoutePlugin should have comment or be unexported (golint)
    • Line 41: warning: exported method CloudFoundrySpecification.GetMiddlewarePlugin should have comment or be unexported (golint)
    • Line 45: warning: exported method CloudFoundrySpecification.GetType should have comment or be unexported (golint)
    • Line 49: warning: exported method CloudFoundrySpecification.GetClientId should have comment or be unexported (golint)
    • Line 57: warning: exported method CloudFoundrySpecification.Register should have comment or be unexported (golint)
    • Line 62: warning: exported method CloudFoundrySpecification.Connect should have comment or be unexported (golint)
    • Line 87: warning: exported method CloudFoundrySpecification.Init should have comment or be unexported (golint)
    • Line 154: warning: exported method CloudFoundrySpecification.AddAdminGroupRoutes should have comment or be unexported (golint)
    • Line 158: warning: exported method CloudFoundrySpecification.AddSessionGroupRoutes should have comment or be unexported (golint)
    • Line 166: warning: exported method CloudFoundrySpecification.Info should have comment or be unexported (golint)
    • Line 206: warning: exported method CloudFoundrySpecification.UpdateMetadata should have comment or be unexported (golint)
    • src/backend/cfapppush/vcs.go
    • Line 23: warning: comment on exported function GetVCS should be of the form "GetVCS ..." (golint)
    • Line 78: warning: receiver name v should be consistent with previous receiver name vcs for vcsCmd (golint)
    • Line 83: warning: receiver name v should be consistent with previous receiver name vcs for vcsCmd (golint)
    • Line 122: warning: exported function EnvForDir should have comment or be unexported (golint)
    • Line 126: warning: exported function MergeEnvLists should have comment or be unexported (golint)
    • src/backend/app-core/repository/tokens/pgsql_tokens.go
    • Line 79: warning: comment on exported method PgsqlTokenRepository.SaveAuthToken should be of the form "SaveAuthToken ..." (golint)
    • Line 275: warning: exported method PgsqlTokenRepository.FindCNSIToken should have comment or be unexported (golint)
    • Line 280: warning: exported method PgsqlTokenRepository.FindCNSITokenIncludeDisconnected should have comment or be unexported (golint)
    • src/backend/app-core/datastore/20171108102900_AuthType.go
    • Line 10: warning: exported method StratosMigrations.Up_20171108102900 should have comment or be unexported (golint)
    • Line 10: warning: don't use underscores in Go names; method Up_20171108102900 should be Up20171108102900 (golint)
    • Line 25: warning: exported function Down_20171108102900 should have comment or be unexported (golint)
    • Line 25: warning: don't use underscores in Go names; func Down_20171108102900 should be Down20171108102900 (golint)
    • src/backend/app-core/repository/interfaces/errors.go
    • Line 11: warning: exported type ErrHTTPShadow should have comment or be unexported (golint)
    • Line 16: warning: exported type ErrHTTPRequest should have comment or be unexported (golint)
    • Line 26: warning: exported function NewHTTPShadowError should have comment or be unexported (golint)
    • Line 44: warning: exported function LogHTTPError should have comment or be unexported (golint)
    • src/backend/cfapppush/types.go
    • Line 9: warning: exported type ManifestResponse should have comment or be unexported (golint)
    • Line 13: warning: exported type SocketMessage should have comment or be unexported (golint)
    • Line 19: warning: exported type SocketWriter should have comment or be unexported (golint)
    • Line 30: warning: exported type StratosProject should have comment or be unexported (golint)
    • Line 34: warning: exported type DeploySource should have comment or be unexported (golint)
    • Line 39: warning: comment on exported type GitHubSourceInfo should be of the form "GitHubSourceInfo ..." (with optional leading article) (golint)
    • Line 48: warning: comment on exported type GitUrlSourceInfo should be of the form "GitUrlSourceInfo ..." (with optional leading article) (golint)
    • Line 57: warning: exported type FolderSourceInfo should have comment or be unexported (golint)
    • Line 64: warning: exported type MessageType should have comment or be unexported (golint)
    • Line 66: warning: comment on exported type RawManifestApplication should be of the form "RawManifestApplication ..." (with optional leading article) (golint)
    • Line 95: warning: exported type DockerCredentials should have comment or be unexported (golint)
    • Line 109: warning: exported type Applications should have comment or be unexported (golint)
    • Line 113: warning: exported type CloneDetails should have comment or be unexported (golint)
    • src/backend/userinfo/main.go
    • Line 10: warning: exported type UserInfo should have comment or be unexported (golint)
    • Line 14: warning: exported function Init should have comment or be unexported (golint)
    • Line 18: warning: exported method UserInfo.GetMiddlewarePlugin should have comment or be unexported (golint)
    • Line 23: warning: exported method UserInfo.GetEndpointPlugin should have comment or be unexported (golint)
    • Line 27: warning: exported method UserInfo.GetRoutePlugin should have comment or be unexported (golint)
    • Line 31: warning: exported method UserInfo.AddAdminGroupRoutes should have comment or be unexported (golint)
    • Line 35: warning: exported method UserInfo.AddSessionGroupRoutes should have comment or be unexported (golint)
    • Line 40: warning: exported method UserInfo.Init should have comment or be unexported (golint)
    • src/backend/cloudfoundryhosting/main.go
    • Line 23: warning: exported const VCapApplication should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type CFHosting should have comment or be unexported (golint)
    • Line 35: warning: exported function Init should have comment or be unexported (golint)
    • Line 39: warning: exported method CFHosting.GetMiddlewarePlugin should have comment or be unexported (golint)
    • Line 46: warning: exported method CFHosting.GetEndpointPlugin should have comment or be unexported (golint)
    • Line 50: warning: exported method CFHosting.GetRoutePlugin should have comment or be unexported (golint)
    • Line 54: warning: exported method CFHosting.Init should have comment or be unexported (golint)
    • Line 185: warning: exported method CFHosting.EchoMiddleware should have comment or be unexported (golint)
    • Line 213: warning: comment on exported method CFHosting.SessionEchoMiddleware should be of the form "SessionEchoMiddleware ..." (golint)
    • src/backend/cfapppush/main.go
    • Line 12: warning: exported type CFAppPush should have comment or be unexported (golint)
    • Line 18: warning: exported function Init should have comment or be unexported (golint)
    • Line 22: warning: exported method CFAppPush.GetMiddlewarePlugin should have comment or be unexported (golint)
    • Line 27: warning: exported method CFAppPush.GetEndpointPlugin should have comment or be unexported (golint)
    • Line 31: warning: exported method CFAppPush.GetRoutePlugin should have comment or be unexported (golint)
    • Line 36: warning: exported method CFAppPush.AddAdminGroupRoutes should have comment or be unexported (golint)
    • Line 40: warning: exported method CFAppPush.AddSessionGroupRoutes should have comment or be unexported (golint)
    • Line 45: warning: exported method CFAppPush.Init should have comment or be unexported (golint)
    • src/backend/cfappssh/main.go
    • Line 10: warning: exported type CFAppSsh should have comment or be unexported (golint)
    • Line 14: warning: exported function Init should have comment or be unexported (golint)
    • Line 18: warning: exported method CFAppSsh.GetMiddlewarePlugin should have comment or be unexported (golint)
    • Line 23: warning: exported method CFAppSsh.GetEndpointPlugin should have comment or be unexported (golint)
    • Line 27: warning: exported method CFAppSsh.GetRoutePlugin should have comment or be unexported (golint)
    • Line 32: warning: exported method CFAppSsh.AddAdminGroupRoutes should have comment or be unexported (golint)
    • Line 36: warning: exported method CFAppSsh.AddSessionGroupRoutes should have comment or be unexported (golint)
    • Line 41: warning: exported method CFAppSsh.Init should have comment or be unexported (golint)
    • src/backend/app-core/repository/console_config/psql_console_config.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 31: warning: comment on exported type ConsoleConfigRepository should be of the form "ConsoleConfigRepository ..." (with optional leading article) (golint)
    • Line 52: warning: comment on exported method ConsoleConfigRepository.GetConsoleConfig should be of the form "GetConsoleConfig ..." (golint)
    • Line 88: warning: comment on exported method ConsoleConfigRepository.SaveConsoleConfig should be of the form "SaveConsoleConfig ..." (golint)
    • Line 107: warning: exported method ConsoleConfigRepository.UpdateConsoleConfig should have comment or be unexported (golint)
    • Line 124: warning: exported method ConsoleConfigRepository.IsInitialised should have comment or be unexported (golint)
    • src/backend/app-core/datastore/20170818162837_SetupSchema.go
    • Line 11: warning: comment on exported method StratosMigrations.Up_20170818162837 should be of the form "Up_20170818162837 ..." (golint)
    • Line 12: warning: don't use underscores in Go names; method Up_20170818162837 should be Up20170818162837 (golint)
    • Line 39: warning: comment on exported function Down_20170818162837 should be of the form "Down_20170818162837 ..." (golint)
    • Line 40: warning: don't use underscores in Go names; func Down_20170818162837 should be Down20170818162837 (golint)
    • src/backend/app-core/datastore/database_cf_config.go
    • Line 14: warning: exported const SERVICES_ENV should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type VCAPService should have comment or be unexported (golint)
    • Line 29: warning: comment on exported function ParseCFEnvs should be of the form "ParseCFEnvs ..." (golint)
    • src/backend/app-core/repository/interfaces/structs.go
    • Line 11: warning: exported type V2Info should have comment or be unexported (golint)
    • Line 20: warning: exported type InfoFunc should have comment or be unexported (golint)
    • Line 22: warning: comment on exported type CNSIRecord should be of the form "CNSIRecord ..." (with optional leading article) (golint)
    • Line 34: warning: comment on exported type ConnectedEndpoint should be of the form "ConnectedEndpoint ..." (with optional leading article) (golint)
    • Line 48: warning: exported const AuthTypeOAuth2 should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: exported const AuthConnectTypeCreds should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: comment on exported type EndpointTokenRecord should be of the form "EndpointTokenRecord ..." (with optional leading article) (golint)
    • Line 66: warning: comment on exported type TokenRecord should be of the form "TokenRecord ..." (with optional leading article) (golint)
    • Line 76: warning: exported type CFInfo should have comment or be unexported (golint)
    • Line 82: warning: comment on exported type OAuth2Metadata should be of the form "OAuth2Metadata ..." (with optional leading article) (golint)
    • Line 89: warning: exported type VCapApplicationData should have comment or be unexported (golint)
    • Line 95: warning: exported type LoginRes should have comment or be unexported (golint)
    • Line 103: warning: exported type LoginHookFunc should have comment or be unexported (golint)
    • Line 105: warning: exported type ProxyRequestInfo should have comment or be unexported (golint)
    • Line 115: warning: exported type SessionStorer should have comment or be unexported (golint)
    • Line 128: warning: exported type JWTUserTokenInfo should have comment or be unexported (golint)
    • Line 144: warning: comment on exported type EndpointDetail should be of the form "EndpointDetail ..." (with optional leading article) (golint)
    • Line 158: warning: exported type ConsoleConfig should have comment or be unexported (golint)
    • Line 167: warning: comment on exported type CNSIRequest should be of the form "CNSIRequest ..." (with optional leading article) (golint)
    • Line 185: warning: exported type PortalConfig should have comment or be unexported (golint)
    • src/backend/metrics/main.go
    • Line 18: warning: exported type MetricsSpecification should have comment or be unexported (golint)
    • Line 24: warning: exported const EndpointType should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type MetricsProviderMetadata should have comment or be unexported (golint)
    • Line 34: warning: exported type MetricsMetadata should have comment or be unexported (golint)
    • Line 41: warning: exported type EndpointMetricsRelation should have comment or be unexported (golint)
    • Line 46: warning: exported function Init should have comment or be unexported (golint)
    • Line 50: warning: exported method MetricsSpecification.GetEndpointPlugin should have comment or be unexported (golint)
    • Line 54: warning: exported method MetricsSpecification.GetRoutePlugin should have comment or be unexported (golint)
    • Line 58: warning: exported method MetricsSpecification.GetMiddlewarePlugin should have comment or be unexported (golint)
    • Line 62: warning: comment on exported method MetricsSpecification.AddAdminGroupRoutes should be of the form "AddAdminGroupRoutes ..." (golint)
    • Line 67: warning: comment on exported method MetricsSpecification.AddSessionGroupRoutes should be of the form "AddSessionGroupRoutes ..." (golint)
    • Line 72: warning: exported method MetricsSpecification.GetType should have comment or be unexported (golint)
    • Line 76: warning: exported method MetricsSpecification.GetClientId should have comment or be unexported (golint)
    • Line 84: warning: exported method MetricsSpecification.Register should have comment or be unexported (golint)
    • Line 89: warning: exported method MetricsSpecification.Connect should have comment or be unexported (golint)
    • Line 139: warning: exported method MetricsSpecification.Init should have comment or be unexported (golint)
    • Line 143: warning: exported method MetricsSpecification.Info should have comment or be unexported (golint)
    • Line 164: warning: exported method MetricsSpecification.UpdateMetadata should have comment or be unexported (golint)
    • src/backend/app-core/datastore/20180413135700_MetricsSchema.go
    • Line 11: warning: exported method StratosMigrations.Up_20180413135700 should have comment or be unexported (golint)
    • Line 11: warning: don't use underscores in Go names; method Up_20180413135700 should be Up20180413135700 (golint)
    • Line 25: warning: exported function Down_20180413135700 should have comment or be unexported (golint)
    • Line 25: warning: don't use underscores in Go names; func Down_20180413135700 should be Down20180413135700 (golint)
    • src/backend/app-core/datastore/datastore.go
    • Line 23: warning: comment on exported const SQLITE should be of the form "SQLITE ..." (golint)
    • Line 62: warning: comment on exported const DefaultDatabaseProvider should be of the form "DefaultDatabaseProvider ..." (golint)
    • Line 102: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 147: warning: exported function GetSQLLiteConnection should have comment or be unexported (golint)
    • src/backend/app-core/datastore/datastore_migrator.go
    • Line 14: warning: exported type StratosMigrationMehod should have comment or be unexported (golint)
    • Line 20: warning: exported type StratosMigrations should have comment or be unexported (golint)
    • Line 33: warning: exported type By should have comment or be unexported (golint)
    • Line 67: warning: exported function ApplyMigrations 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!


misspell97%

Misspell Finds commonly misspelled English words