Preparing report...

Report for github.com/ckeyer/diego

A+    Excellent!    Found 18 issues across 31 files

Tweet

gofmt93%

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!


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!


golint45%

Golint is a linter for Go source code.

    • diego/pkgs/apis/validate/validation.go
    • Line 13: warning: exported const DNS1123LabelMaxLength should have comment or be unexported (golint)
    • Line 32: warning: exported const DNS1123SubdomainMaxLength should have comment or be unexported (golint)
    • Line 51: warning: exported const DNS1035LabelMaxLength should have comment or be unexported (golint)
    • Line 188: warning: exported function IsValidPercent should have comment or be unexported (golint)
    • Line 291: warning: exported function IsValidMgoKey should have comment or be unexported (golint)
    • diego/types/fs.go
    • Line 9: warning: exported const FileStatusOK should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported const FileTypeBin should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: comment on exported type FileMetadata should be of the form "FileMetadata ..." (with optional leading article) (golint)
    • Line 36: warning: exported type FilePath should have comment or be unexported (golint)
    • diego/version/version.go
    • Line 51: warning: comment on exported function GetVersion should be of the form "GetVersion ..." (golint)
    • Line 61: warning: comment on exported function GetInt64 should be of the form "GetInt64 ..." (golint)
    • Line 76: warning: comment on exported function GetGitCommit should be of the form "GetGitCommit ..." (golint)
    • Line 81: warning: comment on exported function GetCompleteVersion should be of the form "GetCompleteVersion ..." (golint)
    • Line 86: warning: exported function GetBuildAt should have comment or be unexported (golint)
    • Line 90: warning: exported function GetBuildAtString should have comment or be unexported (golint)
    • Line 94: warning: exported function Print should have comment or be unexported (golint)
    • diego/api/view/view.go
    • Line 12: warning: exported var Index should have comment or be unexported (golint)
    • Line 15: warning: exported function UI should have comment or be unexported (golint)
    • diego/pkgs/apis/types.go
    • Line 22: warning: exported function Int8 should have comment or be unexported (golint)
    • Line 28: warning: exported function Int64 should have comment or be unexported (golint)
    • Line 43: warning: exported function Uint8 should have comment or be unexported (golint)
    • Line 49: warning: exported function Float32 should have comment or be unexported (golint)
    • Line 55: warning: exported function Float64 should have comment or be unexported (golint)
    • diego/types/utils.go
    • Line 4: warning: exported const OwnerTypeUser should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: exported type Labels should have comment or be unexported (golint)
    • diego/hacks/webhook/cmd_exec.go
    • Line 12: warning: exported var HookFile should have comment or be unexported (golint)
    • Line 14: warning: exported type Hooks should have comment or be unexported (golint)
    • Line 21: warning: exported function Exec should have comment or be unexported (golint)
    • diego/pkgs/apis/error.go
    • Line 9: warning: exported function NotFoundErr should have comment or be unexported (golint)
    • Line 13: warning: exported function BadRequestErr should have comment or be unexported (golint)
    • Line 17: warning: exported function InternalServerErr should have comment or be unexported (golint)
    • diego/pkgs/app/container.go
    • Line 9: warning: exported function Provide should have comment or be unexported (golint)
    • Line 13: warning: exported function Invoke should have comment or be unexported (golint)
    • diego/pkgs/app/db.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 13: warning: exported var DBType should have comment or be unexported (golint)
    • diego/pkgs/apis/validate/version.go
    • Line 9: warning: exported const ValidatePage should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported function ValidateKernelVersion should have comment or be unexported (golint)
    • Line 52: warning: exported function ValidateDockerVersion should have comment or be unexported (golint)
    • diego/pkgs/users/organization.go
    • Line 9: warning: exported type Org should have comment or be unexported (golint)
    • Line 19: warning: exported type Namespace should have comment or be unexported (golint)
    • Line 24: warning: exported type ListOrgOption should have comment or be unexported (golint)
    • diego/pkgs/users/users.go
    • Line 15: warning: exported const TUsers should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type User should have comment or be unexported (golint)
    • Line 33: warning: exported method User.TableName should have comment or be unexported (golint)
    • Line 37: warning: exported type ListUsersOption should have comment or be unexported (golint)
    • Line 73: warning: exported type UserList 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!