Preparing report...

Report for github.com/engi-fyi/go-credentials

A+    Excellent!    Found 11 issues across 32 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!


golint65%

Golint is a linter for Go source code.

    • go-credentials/global/errors.go
    • Line 3: warning: exported const ERR_NOT_YET_IMPLEMENTED should have comment or be unexported (golint)
    • Line 4: warning: exported const ERR_KEY_MUST_MATCH_REGEX should have comment or be unexported (golint)
    • go-credentials/global/test_vars.go
    • Line 3: warning: comment on exported const TEST_VAR_APPLICATION_NAME should be of the form "TEST_VAR_APPLICATION_NAME ..." (golint)
    • Line 7: warning: exported const TEST_VAR_USERNAME_LABEL should have comment or be unexported (golint)
    • Line 8: warning: exported const TEST_VAR_PASSWORD_LABEL should have comment or be unexported (golint)
    • Line 9: warning: exported const TEST_VAR_ATTRIBUTE_NAME_LABEL should have comment or be unexported (golint)
    • Line 10: warning: exported const TEST_VAR_USERNAME_ALTERNATE_LABEL should have comment or be unexported (golint)
    • Line 11: warning: exported const TEST_VAR_PASSWORD_ALTERNATE_LABEL should have comment or be unexported (golint)
    • Line 13: warning: comment on exported const TEST_VAR_ENVIRONMENT_APPLICATION_NAME should be of the form "TEST_VAR_ENVIRONMENT_APPLICATION_NAME ..." (golint)
    • Line 17: warning: exported const TEST_VAR_ENVIRONMENT_ATTRIBUTE_NAME_LABEL should have comment or be unexported (golint)
    • Line 18: warning: exported const TEST_VAR_ENVIRONMENT_USERNAME_LABEL should have comment or be unexported (golint)
    • Line 19: warning: exported const TEST_VAR_ENVIRONMENT_PASSWORD_LABEL should have comment or be unexported (golint)
    • Line 20: warning: exported const TEST_VAR_ENVIRONMENT_USERNAME_ALTERNATE_LABEL should have comment or be unexported (golint)
    • Line 21: warning: exported const TEST_VAR_ENVIRONMENT_PASSWORD_ALTERNATE_LABEL should have comment or be unexported (golint)
    • Line 22: warning: exported const TEST_VAR_ENVIRONMENT_BAD_LABEL should have comment or be unexported (golint)
    • Line 24: warning: comment on exported const TEST_VAR_USERNAME should be of the form "TEST_VAR_USERNAME ..." (golint)
    • Line 28: warning: exported const TEST_VAR_PASSWORD should have comment or be unexported (golint)
    • Line 29: warning: exported const TEST_VAR_BAD_ATTRIBUTE_NAME should have comment or be unexported (golint)
    • Line 30: warning: exported const TEST_VAR_ATTRIBUTE_VALUE should have comment or be unexported (golint)
    • Line 31: warning: exported const TEST_VAR_USERNAME_ALTERNATE should have comment or be unexported (golint)
    • Line 32: warning: exported const TEST_VAR_PASSWORD_ALTERNATE should have comment or be unexported (golint)
    • Line 34: warning: comment on exported const TEST_VAR_FIRST_SECTION_KEY should be of the form "TEST_VAR_FIRST_SECTION_KEY ..." (golint)
    • Line 38: warning: exported const TEST_VAR_SECOND_SECTION_KEY should have comment or be unexported (golint)
    • Line 39: warning: exported const TEST_VAR_BAD_SECTION_KEY should have comment or be unexported (golint)
    • Line 41: warning: exported const TEST_VAR_DUPLICATE_KEY_LABEL should have comment or be unexported (golint)
    • Line 42: warning: exported const TEST_VAR_FIRST_SECTION_UNIQUE_KEY_LABEL should have comment or be unexported (golint)
    • Line 43: warning: exported const TEST_VAR_SECOND_SECTION_UNIQUE_KEY_LABEL should have comment or be unexported (golint)
    • Line 44: warning: exported const TEST_VAR_NO_SECTION_UNIQUE_KEY_LABEL should have comment or be unexported (golint)
    • Line 45: warning: exported const TEST_VAR_BAD_KEY_LABEL should have comment or be unexported (golint)
    • Line 47: warning: exported const TEST_VAR_DUPLICATE_KEY_VALUE should have comment or be unexported (golint)
    • Line 48: warning: exported const TEST_VAR_FIRST_SECTION_UNIQUE_KEY_VALUE should have comment or be unexported (golint)
    • Line 49: warning: exported const TEST_VAR_SECOND_SECTION_UNIQUE_KEY_VALUE should have comment or be unexported (golint)
    • Line 50: warning: exported const TEST_VAR_NO_SECTION_UNIQUE_KEY_VALUE should have comment or be unexported (golint)
    • Line 52: warning: exported const TEST_VAR_FIRST_PROFILE_LABEL should have comment or be unexported (golint)
    • Line 53: warning: exported const TEST_VAR_SECOND_PROFILE_LABEL should have comment or be unexported (golint)
    • Line 54: warning: exported const TEST_VAR_BAD_PROFILE_LABEL should have comment or be unexported (golint)
    • go-credentials/factory/errors.go
    • Line 3: warning: exported const ERR_INVALID_OUTPUT_TYPE should have comment or be unexported (golint)
    • Line 4: warning: exported const ERR_FACTORY_INCONSISTENT_STATE should have comment or be unexported (golint)
    • Line 5: warning: exported const ERR_APPLICATION_NAME_BLANK should have comment or be unexported (golint)
    • Line 6: warning: exported const ERR_KEY_MUST_MATCH_REGEX should have comment or be unexported (golint)
    • Line 7: warning: exported const ERR_FACTORY_NOT_INITIALIZED should have comment or be unexported (golint)
    • Line 8: warning: exported const ERR_ALTERNATE_USERNAME_CANNOT_BE_BLANK should have comment or be unexported (golint)
    • Line 9: warning: exported const ERR_ALTERNATE_PASSWORD_CANNOT_BE_BLANK should have comment or be unexported (golint)
    • go-credentials/serializer/errors.go
    • Line 3: warning: exported const ERR_UNRECOGNIZED_OUTPUT_TYPE should have comment or be unexported (golint)
    • Line 4: warning: exported const ERR_REQUIRED_VARIABLE_USERNAME_NOT_FOUND should have comment or be unexported (golint)
    • Line 5: warning: exported const ERR_REQUIRED_VARIABLE_PASSWORD_NOT_FOUND should have comment or be unexported (golint)
    • go-credentials/credential/main.go
    • Line 19: warning: exported function New should have comment or be unexported (golint)
    • Line 23: warning: exported function NewProfile should have comment or be unexported (golint)
    • Line 26: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 168: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-credentials/profile/errors.go
    • Line 3: warning: exported const ERR_PROFILE_NAME_MUST_MATCH_REGEX should have comment or be unexported (golint)
    • Line 4: warning: exported const ERR_PROFILE_DID_NOT_EXIST should have comment or be unexported (golint)
    • Line 5: warning: exported const ERR_DELETED_ATTRIBUTE_NOT_EXIST should have comment or be unexported (golint)
    • Line 6: warning: exported const ERR_MUST_MATCH_REGEX should have comment or be unexported (golint)
    • Line 7: warning: exported const ERR_NOT_YET_IMPLEMENTED should have comment or be unexported (golint)
    • Line 8: warning: exported const ERR_PROFILE_NOT_INITIALIZED should have comment or be unexported (golint)
    • Line 9: warning: exported const ERR_SECTION_NOT_EXIST should have comment or be unexported (golint)
    • go-credentials/global/const.go
    • Line 3: warning: exported const PASSWORD_LABEL should have comment or be unexported (golint)
    • Line 4: warning: exported const OUTPUT_TYPE_JSON should have comment or be unexported (golint)
    • Line 5: warning: exported const OUTPUT_TYPE_INI should have comment or be unexported (golint)
    • Line 6: warning: exported const OUTPUT_TYPE_ENV should have comment or be unexported (golint)
    • Line 7: warning: exported const USERNAME_LABEL should have comment or be unexported (golint)
    • Line 8: warning: exported const OUTPUT_TYPE_INVALID should have comment or be unexported (golint)
    • Line 9: warning: exported const REGEX_KEY_NAME should have comment or be unexported (golint)
    • Line 10: warning: exported const NO_SECTION_KEY should have comment or be unexported (golint)
    • Line 11: warning: exported const DEFAULT_PROFILE_NAME should have comment or be unexported (golint)
    • Line 12: warning: exported const INDENT_JSON should have comment or be unexported (golint)
    • Line 13: warning: exported const LOG_LEVEL_ENVIRONMENT_KEY should have comment or be unexported (golint)
    • Line 14: warning: exported const LOG_OUTPUT_TYPE_ENV_KEY should have comment or be unexported (golint)
    • Line 15: warning: exported const SECTION_NAME_BLANK should have comment or be unexported (golint)
    • go-credentials/factory/main.go
    • Line 164: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 177: 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 191: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 211: 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 228: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-credentials/credential/errors.go
    • Line 3: warning: exported const ERR_USERNAME_OR_PASSWORD_NOT_SET should have comment or be unexported (golint)
    • Line 4: warning: exported const ERR_FACTORY_MUST_BE_INITIALIZED should have comment or be unexported (golint)
    • Line 5: warning: exported const ERR_KEY_MUST_MATCH_REGEX should have comment or be unexported (golint)
    • Line 6: warning: exported const ERR_NOT_INITIALIZED should have comment or be unexported (golint)
    • Line 7: warning: exported const ERR_CANNOT_SET_USERNAME_WHEN_USING_SECTION should have comment or be unexported (golint)
    • Line 8: warning: exported const ERR_CANNOT_SET_PASSWORD_WHEN_USING_SECTION should have comment or be unexported (golint)
    • Line 9: warning: exported const ERR_CANNOT_REMOVE_USERNAME should have comment or be unexported (golint)
    • Line 10: warning: exported const ERR_CANNOT_REMOVE_PASSWORD should have comment or be unexported (golint)
    • go-credentials/profile/main.go
    • Line 90: warning: comment on exported method Profile.GetAllAttributes should be of the form "GetAllAttributes ..." (golint)
    • Line 108: warning: comment on exported method Profile.GetAllSectionAttributes should be of the form "GetAllSectionAttributes ..." (golint)
    • Line 115: 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)

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!