Preparing report...

Report for github.com/codefresh-io/go-sdk

A+    Excellent!    Found 17 issues across 29 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!


golint44%

Golint is a linter for Go source code.

    • go-sdk/pkg/codefresh/gitops.go
    • Line 6: warning: exported type GitopsAPI should have comment or be unexported (golint)
    • Line 18: warning: exported type CodefreshEvent should have comment or be unexported (golint)
    • Line 23: warning: exported type MongoCFEnvWrapper should have comment or be unexported (golint)
    • Line 27: warning: exported type CFEnvironment should have comment or be unexported (golint)
    • Line 37: warning: exported type EnvironmentMetadata should have comment or be unexported (golint)
    • Line 41: warning: exported type EnvironmentSpec should have comment or be unexported (golint)
    • Line 48: warning: exported type EnvironmentPayload should have comment or be unexported (golint)
    • Line 54: warning: exported type SyncPolicy should have comment or be unexported (golint)
    • Line 58: warning: exported type Commit should have comment or be unexported (golint)
    • Line 63: warning: exported type EnvironmentActivityRS should have comment or be unexported (golint)
    • Line 68: warning: exported type ReplicaState should have comment or be unexported (golint)
    • Line 72: warning: exported type User should have comment or be unexported (golint)
    • Line 76: warning: exported type Annotation should have comment or be unexported (golint)
    • Line 81: warning: exported type Gitops should have comment or be unexported (golint)
    • Line 87: warning: exported type Environment should have comment or be unexported (golint)
    • Line 104: warning: exported type EnvironmentActivity should have comment or be unexported (golint)
    • Line 112: warning: exported type ApplicationResources should have comment or be unexported (golint)
    • go-sdk/pkg/codefresh/pipeline.go
    • Line 17: warning: exported type PipelineMetadata should have comment or be unexported (golint)
    • Line 35: warning: exported type PipelineSpec should have comment or be unexported (golint)
    • Line 53: warning: exported type Pipeline should have comment or be unexported (golint)
    • Line 67: warning: exported type RunOptions should have comment or be unexported (golint)
    • go-sdk/pkg/codefresh/cluster.go
    • Line 6: warning: exported type IClusterAPI should have comment or be unexported (golint)
    • Line 15: warning: exported type Cluster should have comment or be unexported (golint)
    • Line 23: warning: exported type ClusterMinified should have comment or be unexported (golint)
    • go-sdk/pkg/codefresh/contexts.go
    • Line 4: warning: exported type IContextAPI should have comment or be unexported (golint)
    • Line 14: warning: exported type ContextPayload should have comment or be unexported (golint)
    • Line 38: warning: exported type GitContextsQs should have comment or be unexported (golint)
    • Line 48: warning: error should be the last type when returning multiple items (golint)
    • Line 70: warning: error should be the last type when returning multiple items (golint)
    • Line 90: warning: error should be the last type when returning multiple items (golint)
    • go-sdk/pkg/codefresh/types.go
    • Line 6: warning: comment on exported type AuthOptions should be of the form "AuthOptions ..." (with optional leading article) (golint)
    • Line 13: warning: comment on exported type ClientOptions should be of the form "ClientOptions ..." (with optional leading article) (golint)
    • go-sdk/pkg/utils/context_reader.go
    • Line 11: warning: exported type CFContext should have comment or be unexported (golint)
    • Line 26: warning: exported type CFConfig should have comment or be unexported (golint)
    • Line 32: warning: exported function ReadAuthContext should have comment or be unexported (golint)
    • Line 46: warning: exported function GetCFConfig should have comment or be unexported (golint)
    • go-sdk/pkg/codefresh/progress.go
    • Line 8: warning: exported type IProgressAPI should have comment or be unexported (golint)
    • Line 16: warning: exported type Progress should have comment or be unexported (golint)
    • Line 22: warning: exported type Location should have comment or be unexported (golint)
    • go-sdk/pkg/codefresh/runtime_enrionment.go
    • Line 12: warning: exported const KubernetesRunnerType should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type RuntimeEnvironment should have comment or be unexported (golint)
    • Line 41: warning: exported type RuntimeScheduler should have comment or be unexported (golint)
    • Line 57: warning: exported type DockerDaemonScheduler should have comment or be unexported (golint)
    • Line 68: warning: exported type RuntimeMetadata should have comment or be unexported (golint)
    • Line 75: warning: exported type CreateRuntimeOptions should have comment or be unexported (golint)
    • Line 86: warning: exported type ValidateRuntimeOptions should have comment or be unexported (golint)
    • Line 91: warning: exported type SignCertificatesOptions should have comment or be unexported (golint)
    • Line 96: warning: exported type CreateResponse should have comment or be unexported (golint)
    • Line 242: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-sdk/pkg/codefresh/argo.go
    • Line 6: warning: exported type ArgoAPI should have comment or be unexported (golint)
    • Line 20: warning: exported type IntegrationItem should have comment or be unexported (golint)
    • Line 24: warning: exported type IntegrationPayloadData should have comment or be unexported (golint)
    • Line 38: warning: exported type IntegrationPayload should have comment or be unexported (golint)
    • Line 43: warning: exported type Heartbeat should have comment or be unexported (golint)
    • Line 47: warning: exported type AgentState should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign75%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!