Report for github.com/keptn/go-utils

A+    Excellent!    Found 42 issues across 84 files

Tweet

gofmt98%

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!


gocyclo97%

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.


golint53%

Golint is a linter for Go source code.

    • go-utils/pkg/lib/v0_2_0/project_create.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const ProjectCreateTaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type ProjectCreateData should have comment or be unexported (golint)
    • Line 11: warning: exported type ProjectCreateStartedEventData should have comment or be unexported (golint)
    • Line 15: warning: exported type ProjectCreateFinishedEventData should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/service_create.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const ServiceCreateTaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type Helm should have comment or be unexported (golint)
    • Line 9: warning: exported type ServiceCreateStartedEventData should have comment or be unexported (golint)
    • Line 13: warning: exported type ServiceCreateStatusChangedEventData should have comment or be unexported (golint)
    • Line 17: warning: exported type ServiceCreateFinishedEventData should have comment or be unexported (golint)
    • go-utils/pkg/lib/service_level_objectives.go
    • Line 3: warning: exported type SLOComparison should have comment or be unexported (golint)
    • Line 10: warning: exported type SLOCriteria should have comment or be unexported (golint)
    • Line 14: warning: exported type SLO should have comment or be unexported (golint)
    • Line 23: warning: exported type SLOScore should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/events.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 20: warning: exported const MAX_SEND_RETRIES should have comment or be unexported (golint)
    • Line 22: warning: exported const DefaultHTTPEventEndpoint should have comment or be unexported (golint)
    • Line 201: warning: exported function GetEventTypeForTriggeredEvent should have comment or be unexported (golint)
    • Line 221: warning: exported method EventData.GetProject should have comment or be unexported (golint)
    • Line 225: warning: exported method EventData.GetStage should have comment or be unexported (golint)
    • Line 229: warning: exported method EventData.GetService should have comment or be unexported (golint)
    • Line 233: warning: exported method EventData.GetLabels should have comment or be unexported (golint)
    • Line 237: warning: exported method EventData.SetProject should have comment or be unexported (golint)
    • Line 241: warning: exported method EventData.SetStage should have comment or be unexported (golint)
    • Line 245: warning: exported method EventData.SetService should have comment or be unexported (golint)
    • Line 249: warning: exported method EventData.SetLabels should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/getsli.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const GetSLITaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type GetSLITriggeredEventData should have comment or be unexported (golint)
    • Line 11: warning: exported type GetSLI should have comment or be unexported (golint)
    • Line 24: warning: exported type GetSLIStartedEventData should have comment or be unexported (golint)
    • Line 28: warning: exported type GetSLIFinishedEventData should have comment or be unexported (golint)
    • Line 33: warning: exported type GetSLIFinished should have comment or be unexported (golint)
    • Line 41: warning: exported type SLIFilter should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/project_delete.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const ProjectDeleteTaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type ProjectDeleteData should have comment or be unexported (golint)
    • Line 8: warning: exported type ProjectDeleteStartedEventData should have comment or be unexported (golint)
    • Line 12: warning: exported type ProjectDeleteFinishedEventData should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/test.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const TestTaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type TestTriggeredEventData should have comment or be unexported (golint)
    • Line 12: warning: exported type TestTriggeredDetails should have comment or be unexported (golint)
    • Line 17: warning: exported type TestTriggeredDeploymentDetails should have comment or be unexported (golint)
    • Line 24: warning: exported type TestStartedEventData should have comment or be unexported (golint)
    • Line 28: warning: exported type TestStatusChangedEventData should have comment or be unexported (golint)
    • Line 32: warning: exported type TestFinishedEventData should have comment or be unexported (golint)
    • Line 37: warning: exported type TestFinishedDetails should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/keptn.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 14: warning: exported type Keptn should have comment or be unexported (golint)
    • Line 18: warning: exported function NewKeptn should have comment or be unexported (golint)
    • Line 115: warning: comment on exported method Keptn.SendTaskStatusChangedEvent should be of the form "SendTaskStatusChangedEvent ..." (golint)
    • Line 129: warning: comment on exported method Keptn.SendTaskFinishedEvent should be of the form "SendTaskFinishedEvent ..." (golint)
    • go-utils/pkg/lib/v0_2_0/approval.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const ApprovalTaskName should have comment or be unexported (golint)
    • Line 11: warning: exported type ApprovalTriggeredEventData should have comment or be unexported (golint)
    • Line 17: warning: exported type Approval should have comment or be unexported (golint)
    • Line 22: warning: exported type ApprovalStartedEventData should have comment or be unexported (golint)
    • Line 26: warning: exported type ApprovalStatusChangedEventData should have comment or be unexported (golint)
    • Line 30: warning: exported type ApprovalFinishedEventData should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/getaction.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const GetActionTaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type GetActionTriggeredEventData should have comment or be unexported (golint)
    • Line 11: warning: exported type GetActionStartedEventData should have comment or be unexported (golint)
    • Line 15: warning: exported type GetActionFinishedEventData should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/rollback.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const RollbackTaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type RollbackTriggeredEventData should have comment or be unexported (golint)
    • Line 9: warning: exported type RollbackStartedEventData should have comment or be unexported (golint)
    • Line 13: warning: exported type RollbackFinishedEventData should have comment or be unexported (golint)
    • Line 17: warning: exported type RollbackData should have comment or be unexported (golint)
    • go-utils/pkg/lib/keptn/keptn_base.go
    • Line 19: warning: exported type KeptnOpts should have comment or be unexported (golint)
    • Line 29: warning: exported type LoggingOpts should have comment or be unexported (golint)
    • Line 35: warning: exported type KeptnBase should have comment or be unexported (golint)
    • Line 51: warning: exported type EventProperties should have comment or be unexported (golint)
    • Line 72: warning: exported const ConfigurationServiceURL should have comment or be unexported (golint)
    • Line 73: warning: exported const DatastoreURL should have comment or be unexported (golint)
    • Line 74: warning: exported const DefaultLoggingServiceName should have comment or be unexported (golint)
    • Line 172: 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 205: warning: comment on exported function GetServiceEndpoint should be of the form "GetServiceEndpoint ..." (golint)
    • Line 230: warning: exported function GetExpBackoffTime should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/action.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const ActionTaskName should have comment or be unexported (golint)
    • Line 37: warning: exported type ActionData should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/deployment.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const DeploymentTaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type DeploymentTriggeredEventData should have comment or be unexported (golint)
    • Line 21: warning: exported type DeploymentStartedEventData should have comment or be unexported (golint)
    • Line 25: warning: exported type DeploymentStatusChangedEventData should have comment or be unexported (golint)
    • Line 29: warning: exported type DeploymentFinishedEventData should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/service_delete.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const ServiceDeleteTaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type ServiceDeleteStartedEventData should have comment or be unexported (golint)
    • Line 9: warning: exported type ServiceDeleteStatusChangedEventData should have comment or be unexported (golint)
    • Line 13: warning: exported type ServiceDeleteFinishedEventData should have comment or be unexported (golint)
    • go-utils/pkg/common/timeutils/timeutils.go
    • Line 9: warning: exported const KeptnTimeFormatISO8601 should have comment or be unexported (golint)
    • Line 19: warning: exported type GetStartEndTimeParams should have comment or be unexported (golint)
    • Line 26: warning: exported method GetStartEndTimeParams.Validate should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/evaluation.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const EvaluationTaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type EvaluationTriggeredEventData should have comment or be unexported (golint)
    • Line 12: warning: exported type Test should have comment or be unexported (golint)
    • Line 19: warning: exported type Evaluation should have comment or be unexported (golint)
    • Line 28: warning: exported type Deployment should have comment or be unexported (golint)
    • Line 33: warning: exported type EvaluationStartedEventData should have comment or be unexported (golint)
    • Line 37: warning: exported type EvaluationStatusChangedEventData should have comment or be unexported (golint)
    • Line 41: warning: exported type EvaluationFinishedEventData should have comment or be unexported (golint)
    • Line 46: warning: exported type EvaluationDetails should have comment or be unexported (golint)
    • Line 58: warning: exported type SLIResult should have comment or be unexported (golint)
    • Line 65: warning: exported type SLIEvaluationResult should have comment or be unexported (golint)
    • Line 75: warning: exported type SLITarget should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/release.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported const ReleaseTaskName should have comment or be unexported (golint)
    • Line 5: warning: exported type ReleaseTriggeredEventData should have comment or be unexported (golint)
    • Line 10: warning: exported type ReleaseStartedEventData should have comment or be unexported (golint)
    • Line 14: warning: exported type ReleaseStatusChangedEventData should have comment or be unexported (golint)
    • Line 18: warning: exported type ReleaseFinishedEventData should have comment or be unexported (golint)
    • Line 23: warning: exported type ReleaseData should have comment or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/result.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported type ResultType should have comment or be unexported (golint)
    • Line 6: warning: exported const ResultPass should have comment (or a comment on this block) or be unexported (golint)
    • go-utils/pkg/lib/v0_2_0/status.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported type StatusType should have comment or be unexported (golint)
    • Line 6: warning: exported const StatusSucceeded should have comment (or a comment on this block) or be unexported (golint)
    • go-utils/pkg/api/utils/projectUtils.go
    • Line 102: warning: comment on exported method ProjectHandler.GetAllProjects should be of the form "GetAllProjects ..." (golint)
    • Line 201: warning: exported method ProjectHandler.UpdateConfigurationServiceProject should have comment or be unexported (golint)
    • go-utils/pkg/api/utils/serviceUtils.go
    • Line 82: warning: comment on exported method ServiceHandler.CreateServiceInStage should be of the form "CreateServiceInStage ..." (golint)
    • Line 98: warning: exported method ServiceHandler.GetService should have comment or be unexported (golint)
    • Line 127: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words