Preparing report...

Report for github.com/chennqqi/cas_go_sdk

A    Great!    Found 41 issues across 67 files

Tweet

gofmt61%

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!


gocyclo91%

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.

    • cas_go_sdk/cas/api_job.go
    • Line 51: warning: cyclomatic complexity 22 of function (*JobApiService).VaultsVaultNameJobsGet() is high (> 15) (gocyclo)
    • Line 393: warning: cyclomatic complexity 16 of function (*JobApiService).VaultsVaultNameJobsPost() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 16 of function (*JobApiService).VaultsVaultNameJobsJobIDOutputGet() is high (> 15) (gocyclo)
    • cas_go_sdk/cas/api_archive.go
    • Line 547: warning: cyclomatic complexity 18 of function (*ArchiveApiService).VaultsVaultNameMultipartUploadsUploadIDGet() is high (> 15) (gocyclo)
    • Line 248: warning: cyclomatic complexity 16 of function (*ArchiveApiService).VaultsVaultNameMultipartUploadsGet() is high (> 15) (gocyclo)
    • cas_go_sdk/cas/api_vault.go
    • Line 234: warning: cyclomatic complexity 18 of function (*VaultApiService).VaultsGet() is high (> 15) (gocyclo)
    • Line 916: warning: cyclomatic complexity 16 of function (*VaultApiService).VaultsVaultNameNotificationConfigurationPut() is high (> 15) (gocyclo)
    • Line 533: warning: cyclomatic complexity 16 of function (*VaultApiService).VaultsVaultNameAccessPolicyPut() is high (> 15) (gocyclo)

golint83%

Golint is a linter for Go source code.

    • cas_go_sdk/cas/api_job.go
    • Line 260: warning: don't use underscores in Go names; struct field Range_ should be Range (golint)
    • Line 380: warning: exported type UNKNOWN_BASE_TYPE should have comment or be unexported (golint)
    • cas_go_sdk/cas/signature.go
    • Line 25: warning: exported method Signature.Sign should have comment or be unexported (golint)
    • Line 29: warning: exported function CalSignKey should have comment or be unexported (golint)
    • cas_go_sdk/treehash/file.go
    • Line 26: warning: exported const DEFAULT_CHUNK should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported function ComputeHashFromFile should have comment or be unexported (golint)
    • Line 29: warning: don't use underscores in Go names; func parameter chunk_size should be chunkSize (golint)
    • Line 61: warning: exported function ComputeHashFromList should have comment or be unexported (golint)
    • cas_go_sdk/cas/client.go
    • Line 49: warning: exported const DefaultSendBufferSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported type ConfigurationAuthor should have comment or be unexported (golint)
    • Line 246: warning: comment on exported method APIClient.GetConfig should be of the form "GetConfig ..." (golint)
    • Line 312: warning: exported type ConfigurationModeSecret should have comment or be unexported (golint)
    • Line 318: warning: exported method ConfigurationModeSecret.Authorization should have comment or be unexported (golint)
    • Line 337: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 391: warning: exported type ConfigurationModeSignKey should have comment or be unexported (golint)
    • Line 400: warning: exported method ConfigurationModeSignKey.Authorization should have comment or be unexported (golint)
    • Line 418: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • cas_go_sdk/cas/model_jobs_list.go
    • Line 20: warning: comment on exported type OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo should be of the form "OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo ..." (with optional leading article) (golint)
    • Line 38: warning: exported method OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo.MarshalJSON should have comment or be unexported (golint)
    • Line 53: warning: exported method OneOfJobArchiveSearchInfoJobArchiveListSearchInfoJobArchiveImportInfoJobArchiveExportInfo.UnmarshalJSON should have comment or be unexported (golint)
    • cas_go_sdk/cmd/cascmd/lscmd.go
    • Line 40: warning: receiver name p should be consistent with previous receiver name c for lsCmd (golint)
    • Line 44: warning: receiver name p should be consistent with previous receiver name c for lsCmd (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words