Preparing report...

Report for github.com/AnalogJ/drawbridge

A+    Excellent!    Found 36 issues across 52 files

Tweet

gofmt96%

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!


golint50%

Golint is a linter for Go source code.

    • drawbridge/pkg/utils/stdin.go
    • Line 13: warning: exported function StdinQueryPassword should have comment or be unexported (golint)
    • Line 25: warning: exported function StdinQuery should have comment or be unexported (golint)
    • Line 34: warning: exported function StdinQueryBoolean should have comment or be unexported (golint)
    • Line 49: warning: exported function StdinQueryInt should have comment or be unexported (golint)
    • drawbridge/pkg/actions/proxy.go
    • Line 5: warning: exported type ProxyAction should have comment or be unexported (golint)
    • Line 9: warning: exported method ProxyAction.Start should have comment or be unexported (golint)
    • drawbridge/pkg/config/config.go
    • Line 169: warning: don't use underscores in Go names; var config_data should be configData (golint)
    • Line 454: 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)
    • drawbridge/pkg/utils/file.go
    • Line 13: warning: exported function ExpandPath should have comment or be unexported (golint)
    • Line 26: warning: exported function FileWrite should have comment or be unexported (golint)
    • Line 46: warning: exported function FileExists should have comment or be unexported (golint)
    • Line 58: warning: exported function FileDelete should have comment or be unexported (golint)
    • drawbridge/pkg/errors/errors.go
    • Line 7: warning: comment on exported type ConfigFileMissingError should be of the form "ConfigFileMissingError ..." (with optional leading article) (golint)
    • Line 14: warning: comment on exported type ConfigValidationError should be of the form "ConfigValidationError ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported type DependencyMissingError should be of the form "DependencyMissingError ..." (with optional leading article) (golint)
    • Line 28: warning: comment on exported type PemKeyMissingError should be of the form "PemKeyMissingError ..." (with optional leading article) (golint)
    • Line 35: warning: comment on exported type TemplateFileExistsError should be of the form "TemplateFileExistsError ..." (with optional leading article) (golint)
    • Line 42: warning: comment on exported type QuestionKeyInvalidError should be of the form "QuestionKeyInvalidError ..." (with optional leading article) (golint)
    • Line 49: warning: exported type AnswerValidationError should have comment or be unexported (golint)
    • Line 55: warning: comment on exported type AnswerFormatError should be of the form "AnswerFormatError ..." (with optional leading article) (golint)
    • Line 62: warning: comment on exported type UpdateNotAvailableError should be of the form "UpdateNotAvailableError ..." (with optional leading article) (golint)
    • Line 69: warning: comment on exported type UpdateBinaryOsArchMissingError should be of the form "UpdateBinaryOsArchMissingError ..." (with optional leading article) (golint)
    • Line 76: warning: exported type ProjectListEmptyError should have comment or be unexported (golint)
    • Line 82: warning: exported type ProjectListIndexInvalidError should have comment or be unexported (golint)
    • Line 88: warning: exported type InvalidArgumentsError should have comment or be unexported (golint)
    • drawbridge/pkg/config/question.go
    • Line 9: warning: exported type Question should have comment or be unexported (golint)
    • Line 15: warning: exported method Question.GetType should have comment or be unexported (golint)
    • Line 19: warning: exported method Question.Required should have comment or be unexported (golint)
    • Line 24: warning: exported method Question.Validate should have comment or be unexported (golint)
    • drawbridge/pkg/utils/map.go
    • Line 8: warning: exported function MapKeys should have comment or be unexported (golint)
    • Line 17: warning: exported function MapDeepCopy should have comment or be unexported (golint)
    • drawbridge/pkg/project/factory.go
    • Line 13: warning: comment on exported function CreateProjectListFromConfigDir should be of the form "CreateProjectListFromConfigDir ..." (golint)
    • Line 42: warning: comment on exported function CreateProjectListFromProvidedAnswers should be of the form "CreateProjectListFromProvidedAnswers ..." (golint)
    • Line 67: warning: exported function CreateProjectFromConfigDirAnswerFile should have comment or be unexported (golint)
    • drawbridge/pkg/project/project_list.go
    • Line 15: warning: exported type ProjectList should have comment or be unexported (golint)
    • Line 28: warning: exported method ProjectList.Length should have comment or be unexported (golint)
    • Line 32: warning: exported method ProjectList.GetAll should have comment or be unexported (golint)
    • Line 44: warning: exported method ProjectList.GetIndex should have comment or be unexported (golint)
    • Line 44: warning: don't use underscores in Go names; method parameter index_0based should be index0based (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 60: warning: exported method ProjectList.Prompt should have comment or be unexported (golint)
    • Line 74: warning: don't use underscores in Go names; var index_1based should be index1based (golint)
    • Line 90: warning: exported method ProjectList.PrintTree should have comment or be unexported (golint)
    • Line 182: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • drawbridge/pkg/utils/cmd.go
    • Line 17: warning: exported function BashCmdExec should have comment or be unexported (golint)
    • Line 21: warning: exported function CmdExec should have comment or be unexported (golint)
    • drawbridge/pkg/utils/string.go
    • Line 8: warning: exported function StringToInt should have comment or be unexported (golint)
    • Line 16: warning: exported function SnakeCaseToCamelCase should have comment or be unexported (golint)
    • Line 47: warning: exported function LeftPad should have comment or be unexported (golint)
    • Line 50: warning: exported function RightPad should have comment or be unexported (golint)
    • Line 70: warning: exported function RightPad2Len should have comment or be unexported (golint)
    • Line 75: warning: exported function LeftPad2Len should have comment or be unexported (golint)
    • Line 81: warning: exported function StripIndent should have comment or be unexported (golint)
    • drawbridge/pkg/utils/tmpl.go
    • Line 11: warning: exported function PopulatePathTemplate should have comment or be unexported (golint)
    • Line 23: warning: exported function PopulateTemplate should have comment or be unexported (golint)
    • Line 75: warning: comment on exported function UniquePort should be of the form "UniquePort ..." (golint)
    • drawbridge/pkg/config/template/config_template.go
    • Line 10: warning: comment on exported type ConfigTemplate should be of the form "ConfigTemplate ..." (with optional leading article) (golint)
    • Line 17: warning: exported method ConfigTemplate.DeleteTemplate should have comment or be unexported (golint)
    • Line 22: warning: exported method ConfigTemplate.WriteTemplate should have comment or be unexported (golint)
    • drawbridge/pkg/config/template/file_template.go
    • Line 13: warning: exported type FileTemplate should have comment or be unexported (golint)
    • Line 30: warning: exported method FileTemplate.DeleteTemplate should have comment or be unexported (golint)
    • Line 40: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 45: warning: exported method FileTemplate.WriteTemplate should have comment or be unexported (golint)
    • drawbridge/pkg/actions/update.go
    • Line 19: warning: exported type UpdateAction should have comment or be unexported (golint)
    • Line 23: warning: exported type GithubReleaseInfo should have comment or be unexported (golint)
    • Line 33: warning: comment on exported method UpdateAction.Start should be of the form "Start ..." (golint)
    • Line 106: warning: exported method UpdateAction.GetLatestReleaseInfo should have comment or be unexported (golint)
    • drawbridge/pkg/actions/connect.go
    • Line 23: warning: exported type ConnectAction should have comment or be unexported (golint)
    • Line 27: warning: exported method ConnectAction.Start should have comment or be unexported (golint)
    • Line 74: warning: exported method ConnectAction.SshAgentAddPemKey should have comment or be unexported (golint)
    • drawbridge/pkg/actions/create.go
    • Line 16: warning: exported type CreateAction should have comment or be unexported (golint)
    • Line 20: warning: exported method CreateAction.Start should have comment or be unexported (golint)
    • Line 112: warning: exported method CreateAction.WriteAnswersFile should have comment or be unexported (golint)
    • Line 129: warning: exported method CreateAction.Query should have comment or be unexported (golint)
    • drawbridge/pkg/actions/delete.go
    • Line 13: warning: exported type DeleteAction should have comment or be unexported (golint)
    • Line 17: warning: exported method DeleteAction.All should have comment or be unexported (golint)
    • Line 27: warning: exported method DeleteAction.One should have comment or be unexported (golint)

gocyclo96%

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.


ineffassign80%

IneffAssign detects ineffectual assignments in Go code.

    • drawbridge/pkg/config/question_test.go
    • Line 16: warning: ineffectual assignment to err (ineffassign)
    • Line 30: warning: ineffectual assignment to err (ineffassign)
    • Line 43: warning: ineffectual assignment to err (ineffassign)
    • Line 44: warning: ineffectual assignment to err (ineffassign)
    • Line 57: warning: ineffectual assignment to err (ineffassign)
    • Line 58: warning: ineffectual assignment to err (ineffassign)
    • Line 71: warning: ineffectual assignment to err (ineffassign)
    • Line 86: warning: ineffectual assignment to err (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell94%

Misspell Finds commonly misspelled English words