Preparing report...

Report for github.com/att-cloudnative-labs/template-api

A+    Excellent!    Found 10 issues across 16 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!


golint37%

Golint is a linter for Go source code.

    • template-api/pkg/genesis/template/project.go
    • Line 45: warning: comment on exported type GenesisTemplateApi should be of the form "GenesisTemplateApi ..." (with optional leading article) (golint)
    • Line 50: warning: exported function NewGenesisTemplateApi should have comment or be unexported (golint)
    • Line 56: warning: exported method GenesisTemplateApi.GetProjectNames should have comment or be unexported (golint)
    • Line 71: warning: exported method GenesisTemplateApi.GetProjectFromRepo should have comment or be unexported (golint)
    • Line 87: warning: exported method GenesisTemplateApi.GetProjectsFromRepo should have comment or be unexported (golint)
    • Line 104: warning: exported method GenesisTemplateApi.GenerateFromTemplate should have comment or be unexported (golint)
    • Line 135: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 245: warning: exported function FindTokens should have comment or be unexported (golint)
    • Line 266: warning: exported function RecursiveReplace should have comment or be unexported (golint)
    • Line 289: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 295: warning: exported function StringRecursiveReplace should have comment or be unexported (golint)
    • Line 405: warning: exported method GenesisTemplateApi.Replace should have comment or be unexported (golint)
    • Line 418: warning: exported method GenesisTemplateApi.ValidateGenesisProject should have comment or be unexported (golint)
    • Line 431: warning: exported method GenesisTemplateApi.Cleanup should have comment or be unexported (golint)
    • template-api/pkg/genesis/template/types.go
    • Line 10: warning: exported var ErrRootUndefined should have comment or be unexported (golint)
    • Line 13: warning: exported type Project should have comment or be unexported (golint)
    • Line 25: warning: exported type GenesisProject should have comment or be unexported (golint)
    • Line 30: warning: exported method GenesisProject.SetClonedDirectoryPath should have comment or be unexported (golint)
    • Line 38: warning: exported method GenesisProject.GetTemplateFileName should have comment or be unexported (golint)
    • Line 42: warning: exported method GenesisProject.GetClonedDirectoryPath should have comment or be unexported (golint)
    • Line 70: warning: exported type Language should have comment or be unexported (golint)
    • Line 75: warning: exported type Runtime should have comment or be unexported (golint)
    • Line 81: warning: exported type Option should have comment or be unexported (golint)
    • Line 89: warning: comment on exported type GenesisVariable should be of the form "GenesisVariable ..." (with optional leading article) (golint)
    • Line 99: warning: exported function NewGenesisVariable should have comment or be unexported (golint)
    • Line 144: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 149: warning: exported method GenesisVariable.GetParsedValue should have comment or be unexported (golint)
    • Line 156: warning: exported function ReplaceGenesisVariable should have comment or be unexported (golint)
    • Line 164: warning: comment on exported function GetFilterMap should be of the form "GetFilterMap ..." (golint)
    • Line 176: warning: exported type Filter should have comment or be unexported (golint)
    • Line 178: warning: exported function DefaultFilter should have comment or be unexported (golint)
    • Line 182: warning: exported function UpperCaseFilter should have comment or be unexported (golint)
    • Line 186: warning: exported function LowerCaseFilter should have comment or be unexported (golint)
    • Line 190: warning: comment on exported type FormGroup should be of the form "FormGroup ..." (with optional leading article) (golint)
    • Line 197: warning: exported type FormField should have comment or be unexported (golint)
    • Line 213: warning: exported type SelectOption should have comment or be unexported (golint)
    • Line 219: warning: exported type ImageButton should have comment or be unexported (golint)
    • Line 228: warning: comment on exported type FormFieldType should be of the form "FormFieldType ..." (with optional leading article) (golint)
    • Line 232: warning: exported const TEXT should have comment (or a comment on this block) or be unexported (golint)
    • Line 255: warning: exported type DisplayOptionType should have comment or be unexported (golint)
    • Line 258: warning: exported const LANGUAGE should have comment (or a comment on this block) or be unexported (golint)
    • Line 270: warning: exported type GenesisTemplate should have comment or be unexported (golint)
    • Line 281: warning: exported type GenesisGitRepository should have comment or be unexported (golint)
    • Line 286: warning: exported method GenesisTemplate.OrganizeGroups should have comment or be unexported (golint)
    • Line 320: warning: exported method GenesisTemplate.GetRoot should have comment or be unexported (golint)
    • Line 328: warning: exported method GenesisTemplate.GetRequiredOptions should have comment or be unexported (golint)
    • Line 340: warning: exported method GenesisTemplate.SetValidatedOptions should have comment or be unexported (golint)
    • Line 350: warning: exported method GenesisTemplate.GetName should have comment or be unexported (golint)
    • Line 354: warning: exported method GenesisTemplate.GetValidatedOptions should have comment or be unexported (golint)
    • template-api/pkg/genesis/git_client/client.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 19: warning: comment on exported type GitClient should be of the form "GitClient ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported type GitRepoConfig should be of the form "GitRepoConfig ..." (with optional leading article) (golint)
    • template-api/pkg/genesis/git_client/types.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported type BitBucketRepoResponse should have comment or be unexported (golint)
    • Line 10: warning: exported type BitBucketRepoResponseItem should have comment or be unexported (golint)
    • Line 21: warning: exported type BitBucketProjectResponseItem should have comment or be unexported (golint)
    • Line 30: warning: exported method BitBucketRepoResponse.GetRepositoryNames should have comment or be unexported (golint)
    • template-api/pkg/api/types.go
    • Line 8: warning: comment on exported type GenesisTemplateRequest should be of the form "GenesisTemplateRequest ..." (with optional leading article) (golint)
    • Line 13: warning: exported type GenesisTemplate should have comment or be unexported (golint)
    • Line 20: warning: exported type Option should have comment or be unexported (golint)
    • Line 25: warning: exported type GenesisPayload should have comment or be unexported (golint)
    • Line 35: warning: exported type BitBucketRepo should have comment or be unexported (golint)
    • Line 43: warning: exported type ErrorResponse should have comment or be unexported (golint)
    • Line 48: warning: exported function NewErrorResponse should have comment or be unexported (golint)
    • Line 55: warning: exported function NewErrorResponseJson should have comment or be unexported (golint)
    • Line 66: warning: exported type SuccessResponse should have comment or be unexported (golint)
    • Line 71: warning: exported function NewSuccessResponse should have comment or be unexported (golint)
    • Line 78: warning: exported function NewSuccessResponseJson should have comment or be unexported (golint)
    • template-api/pkg/genesis/orchestrator.go
    • Line 15: warning: exported type TemplateOrchestrator should have comment or be unexported (golint)
    • Line 20: warning: exported type TemplateName should have comment or be unexported (golint)
    • Line 25: warning: exported function NewTemplateOrchestrator should have comment or be unexported (golint)
    • Line 86: warning: comment on exported method TemplateOrchestrator.GetTemplateNames should be of the form "GetTemplateNames ..." (golint)
    • Line 104: warning: exported method TemplateOrchestrator.GetTemplates should have comment or be unexported (golint)
    • Line 133: warning: exported method TemplateOrchestrator.GetTemplate should have comment or be unexported (golint)
    • Line 157: warning: exported method TemplateOrchestrator.GetListOfRepositoriesForProject should have comment or be unexported (golint)
    • Line 163: warning: comment on exported method TemplateOrchestrator.GenerateFromTemplateAndCommit should be of the form "GenerateFromTemplateAndCommit ..." (golint)
    • Line 182: warning: comment on exported method TemplateOrchestrator.GenerateFromTemplateBranchAndCommit should be of the form "GenerateFromTemplateBranchAndCommit ..." (golint)
    • Line 200: warning: comment on exported method TemplateOrchestrator.GenerateFromTemplateTagAndCommit should be of the form "GenerateFromTemplateTagAndCommit ..." (golint)
    • template-api/pkg/genesis/git_client/bitbucket_client.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 21: warning: exported type BitBucketRepoRequest should have comment or be unexported (golint)
    • Line 27: warning: exported type BitBucketWebHookRequest should have comment or be unexported (golint)
    • Line 36: warning: comment on exported type BitBucketRepoConfig should be of the form "BitBucketRepoConfig ..." (with optional leading article) (golint)
    • Line 48: warning: exported method BitBucketRepoConfig.GetRepoDomain should have comment or be unexported (golint)
    • Line 52: warning: exported method BitBucketRepoConfig.Validate should have comment or be unexported (golint)
    • Line 56: warning: exported function NewBitBucketRepoConfig should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method BitBucketRepoConfig.ConstructRestApiUrl should be of the form "ConstructRestApiUrl ..." (golint)
    • Line 71: warning: comment on exported method BitBucketRepoConfig.ConstructRepoUrl should be of the form "ConstructRepoUrl ..." (golint)
    • Line 76: warning: exported method BitBucketRepoConfig.GetRepoName should have comment or be unexported (golint)
    • Line 80: warning: exported method BitBucketRepoConfig.SetRepoName should have comment or be unexported (golint)
    • Line 84: warning: exported type BitBucketClientConfig should have comment or be unexported (golint)
    • Line 94: warning: exported function NewBitBucketClientConfig should have comment or be unexported (golint)
    • Line 129: warning: exported type BitBucketClient should have comment or be unexported (golint)
    • Line 134: warning: comment on exported method BitBucketClient.ListAllReposForProjectKey should be of the form "ListAllReposForProjectKey ..." (golint)
    • Line 170: warning: exported method BitBucketClient.CreateWebhook should have comment or be unexported (golint)
    • Line 207: warning: exported function NewBitBucketClient should have comment or be unexported (golint)
    • Line 214: warning: comment on exported method BitBucketClient.CreateScmRepoUrl should be of the form "CreateScmRepoUrl ..." (golint)
    • Line 219: warning: exported method BitBucketClient.CreateNewRemoteRepo should have comment or be unexported (golint)
    • Line 266: warning: exported method BitBucketClient.InitRepo should have comment or be unexported (golint)
    • Line 280: warning: exported method BitBucketClient.InitialCommitProjectToRepo should have comment or be unexported (golint)
    • Line 349: warning: exported method BitBucketClient.RepoExists should have comment or be unexported (golint)
    • Line 387: warning: exported method BitBucketClient.GetFileFromRepo should have comment or be unexported (golint)
    • Line 391: warning: exported method BitBucketClient.CloneRepo should have comment or be unexported (golint)
    • Line 413: warning: exported method BitBucketClient.CheckoutBranch should have comment or be unexported (golint)
    • Line 437: warning: exported method BitBucketClient.CheckoutTag should have comment or be unexported (golint)
    • Line 460: warning: exported method BitBucketClient.AddAdminRights should have comment or be unexported (golint)
    • template-api/pkg/genesis/git_client/github_client.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 15: warning: comment on exported type GithubRepoConfig should be of the form "GithubRepoConfig ..." (with optional leading article) (golint)
    • Line 24: warning: exported method GithubRepoConfig.GetRepoDomain should have comment or be unexported (golint)
    • Line 28: warning: exported method GithubRepoConfig.ConstructRestApiUrl should have comment or be unexported (golint)
    • Line 32: warning: exported function NewGithubRepoConfig should have comment or be unexported (golint)
    • Line 42: warning: exported method GithubRepoConfig.ConstructRepoUrl should have comment or be unexported (golint)
    • Line 49: warning: exported method GithubRepoConfig.GetRepoName should have comment or be unexported (golint)
    • Line 53: warning: exported method GithubRepoConfig.SetRepoName should have comment or be unexported (golint)
    • Line 57: warning: exported method GithubRepoConfig.Validate should have comment or be unexported (golint)
    • Line 61: warning: exported type GitHubClientConfig should have comment or be unexported (golint)
    • Line 69: warning: exported function NewGitClientConfig should have comment or be unexported (golint)
    • Line 95: warning: exported type GitHubClient should have comment or be unexported (golint)
    • Line 100: warning: exported function NewGitHubClient should have comment or be unexported (golint)
    • Line 107: warning: exported method GitHubClient.ListAllReposForProjectKey should have comment or be unexported (golint)
    • Line 111: warning: exported method GitHubClient.GetFileFromRepo should have comment or be unexported (golint)
    • Line 115: warning: exported method GitHubClient.InitialCommitProjectToRepo should have comment or be unexported (golint)
    • Line 119: warning: exported method GitHubClient.InitRepo should have comment or be unexported (golint)
    • Line 123: warning: exported method GitHubClient.CreateScmRepoUrl should have comment or be unexported (golint)
    • Line 177: warning: exported method GitHubClient.CloneRepo should have comment or be unexported (golint)
    • Line 209: warning: exported method GitHubClient.CheckoutBranch should have comment or be unexported (golint)
    • Line 213: warning: exported method GitHubClient.CheckoutTag should have comment or be unexported (golint)
    • Line 217: warning: exported method GitHubClient.RepoExists should have comment or be unexported (golint)
    • Line 249: warning: exported method GitHubClient.CreateWebhook should have comment or be unexported (golint)
    • Line 253: warning: exported method GitHubClient.AddAdminRights should have comment or be unexported (golint)
    • template-api/genesis_config/profile.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 8: warning: exported var AuthConfig should have comment or be unexported (golint)
    • Line 10: warning: exported type AppConfig should have comment or be unexported (golint)
    • Line 26: warning: exported type GitHubTemplateRepository should have comment or be unexported (golint)
    • Line 32: warning: exported type BitBucketTemplateRepository should have comment or be unexported (golint)
    • Line 40: warning: exported function InitConfig 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!