Preparing report...

Report for github.com/lunarway/release-manager

A+    Excellent!    Found 77 issues across 152 files

Tweet

gofmt96%

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!


gocyclo98%

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.

    • release-manager/cmd/daemon/kubernetes/exporter.go
    • Line 19: warning: exported type ReleaseManagerExporter should have comment or be unexported (golint)
    • Line 25: warning: exported method ReleaseManagerExporter.SendSuccessfulReleaseEvent should have comment or be unexported (golint)
    • Line 40: warning: exported method ReleaseManagerExporter.SendPodErrorEvent should have comment or be unexported (golint)
    • Line 55: warning: exported method ReleaseManagerExporter.SendJobErrorEvent should have comment or be unexported (golint)
    • release-manager/internal/http/types.go
    • Line 12: warning: exported type StatusRequest should have comment or be unexported (golint)
    • Line 16: warning: exported type StatusResponse should have comment or be unexported (golint)
    • Line 23: warning: exported type Environment should have comment or be unexported (golint)
    • Line 35: warning: exported type ReleaseRequest should have comment or be unexported (golint)
    • Line 44: warning: exported method ReleaseRequest.Validate should have comment or be unexported (golint)
    • Line 70: warning: exported type ReleaseResponse should have comment or be unexported (golint)
    • Line 78: warning: exported type FluxNotifyResponse should have comment or be unexported (golint)
    • Line 81: warning: exported type FluxNotifyRequest should have comment or be unexported (golint)
    • Line 86: warning: exported method FluxNotifyRequest.Validate should have comment or be unexported (golint)
    • Line 94: warning: exported type ReleaseEvent should have comment or be unexported (golint)
    • Line 104: warning: exported type ContainerError should have comment or be unexported (golint)
    • Line 110: warning: exported type PodErrorEvent should have comment or be unexported (golint)
    • Line 119: warning: exported type JobConditionError should have comment or be unexported (golint)
    • Line 124: warning: exported type JobErrorEvent should have comment or be unexported (golint)
    • Line 133: warning: exported type KubernetesNotifyResponse should have comment or be unexported (golint)
    • Line 136: warning: exported type ListPoliciesResponse should have comment or be unexported (golint)
    • Line 142: warning: exported type AutoReleasePolicy should have comment or be unexported (golint)
    • Line 148: warning: exported type BranchRestrictionPolicy should have comment or be unexported (golint)
    • Line 154: warning: exported type ApplyBranchRestrictionPolicyRequest should have comment or be unexported (golint)
    • Line 162: warning: exported method ApplyBranchRestrictionPolicyRequest.Validate should have comment or be unexported (golint)
    • Line 182: warning: exported type ApplyBranchRestrictionPolicyResponse should have comment or be unexported (golint)
    • Line 189: warning: exported type ApplyAutoReleasePolicyRequest should have comment or be unexported (golint)
    • Line 197: warning: exported method ApplyAutoReleasePolicyRequest.Validate should have comment or be unexported (golint)
    • Line 217: warning: exported type ApplyPolicyResponse should have comment or be unexported (golint)
    • Line 224: warning: exported type DeletePolicyRequest should have comment or be unexported (golint)
    • Line 231: warning: exported method DeletePolicyRequest.Validate should have comment or be unexported (golint)
    • Line 249: warning: exported type DeletePolicyResponse should have comment or be unexported (golint)
    • Line 262: warning: exported type DescribeReleaseResponseRelease should have comment or be unexported (golint)
    • Line 271: warning: exported type DescribeArtifactResponse should have comment or be unexported (golint)
    • Line 276: warning: exported type ArtifactUploadRequest should have comment or be unexported (golint)
    • Line 281: warning: exported method ArtifactUploadRequest.Validate should have comment or be unexported (golint)
    • Line 295: warning: exported type ArtifactUploadResponse should have comment or be unexported (golint)
    • release-manager/internal/intent/intent.go
    • Line 6: warning: exported const TypeReleaseArtifact should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type Intent should have comment or be unexported (golint)
    • Line 20: warning: exported type ReleaseBranchIntent should have comment or be unexported (golint)
    • Line 24: warning: exported type PromoteIntent should have comment or be unexported (golint)
    • Line 28: warning: exported type RollbackIntent should have comment or be unexported (golint)
    • Line 32: warning: exported function NewReleaseArtifact should have comment or be unexported (golint)
    • Line 38: warning: exported function NewReleaseBranch should have comment or be unexported (golint)
    • Line 47: warning: exported function NewPromoteEnvironment should have comment or be unexported (golint)
    • Line 56: warning: exported function NewAutoRelease should have comment or be unexported (golint)
    • Line 62: warning: exported function NewRollback should have comment or be unexported (golint)
    • Line 71: warning: exported method Intent.Valid should have comment or be unexported (golint)
    • Line 75: warning: exported method Intent.Empty should have comment or be unexported (golint)
    • Line 79: warning: exported method Intent.AsArtifactWithIntent should have comment or be unexported (golint)
    • release-manager/internal/flow/new_artifact.go
    • Line 33: warning: exported type NewArtifactEvent should have comment or be unexported (golint)
    • Line 38: warning: exported method NewArtifactEvent.Type should have comment or be unexported (golint)
    • Line 42: warning: exported method NewArtifactEvent.Marshal should have comment or be unexported (golint)
    • Line 46: warning: exported method NewArtifactEvent.Unmarshal should have comment or be unexported (golint)
    • release-manager/cmd/daemon/flux/exporter.go
    • Line 13: warning: exported type Message should have comment or be unexported (golint)
    • Line 22: warning: exported type ReleaseManagerExporter should have comment or be unexported (golint)
    • Line 28: warning: exported method ReleaseManagerExporter.Send should have comment or be unexported (golint)
    • release-manager/internal/broker/memory/memory.go
    • Line 12: warning: exported type Broker should have comment or be unexported (golint)
    • Line 25: warning: exported method Broker.Close should have comment or be unexported (golint)
    • Line 30: warning: exported method Broker.Publish should have comment or be unexported (golint)
    • Line 44: warning: exported method Broker.StartConsumer should have comment or be unexported (golint)
    • release-manager/internal/commitinfo/conventional.go
    • Line 11: warning: exported type ConventionalCommitInfo should have comment or be unexported (golint)
    • Line 17: warning: exported type Field should have comment or be unexported (golint)
    • Line 22: warning: exported function NewField should have comment or be unexported (golint)
    • Line 26: warning: exported method ConventionalCommitInfo.Field should have comment or be unexported (golint)
    • Line 34: warning: exported method ConventionalCommitInfo.SetField should have comment or be unexported (golint)
    • Line 44: warning: exported method ConventionalCommitInfo.HasField should have comment or be unexported (golint)
    • Line 73: warning: exported function ParseConventionalCommit should have comment or be unexported (golint)
    • release-manager/internal/slack/message.go
    • Line 20: warning: exported var MsgColorGreen should have comment or be unexported (golint)
    • Line 25: warning: exported type Message should have comment or be unexported (golint)
    • Line 35: warning: exported function Get should have comment or be unexported (golint)
    • Line 63: warning: exported function Persist should have comment or be unexported (golint)
    • release-manager/internal/flow/notify.go
    • Line 13: warning: exported method Service.NotifyK8SDeployEvent should have comment or be unexported (golint)
    • Line 25: warning: exported method Service.NotifyK8SPodErrorEvent should have comment or be unexported (golint)
    • Line 37: warning: exported method Service.NotifyK8SJobErrorEvent should have comment or be unexported (golint)
    • Line 49: warning: exported method Service.NotifyFluxEvent should have comment or be unexported (golint)
    • release-manager/internal/git/git.go
    • Line 25: warning: exported var ErrNothingToCommit should have comment or be unexported (golint)
    • Line 31: warning: exported type GitConfig should have comment or be unexported (golint)
    • Line 37: warning: exported type Service should have comment or be unexported (golint)
    • Line 49: warning: exported method Service.MasterPath should have comment or be unexported (golint)
    • Line 161: warning: exported method Service.Checkout should have comment or be unexported (golint)
    • Line 301: warning: exported method Service.Commit should have comment or be unexported (golint)
    • Line 341: warning: exported method Service.SignedCommit should have comment or be unexported (golint)
    • release-manager/internal/artifact/spec.go
    • Line 23: warning: exported type Spec should have comment or be unexported (golint)
    • Line 34: warning: exported type Repository should have comment or be unexported (golint)
    • Line 47: warning: exported type Shuttle should have comment or be unexported (golint)
    • Line 52: warning: exported type CI should have comment or be unexported (golint)
    • Line 58: warning: exported type Stage should have comment or be unexported (golint)
    • Line 64: warning: exported type BuildData should have comment or be unexported (golint)
    • Line 70: warning: exported type PushData should have comment or be unexported (golint)
    • Line 76: warning: exported type TestData should have comment or be unexported (golint)
    • Line 81: warning: exported type TestResult should have comment or be unexported (golint)
    • Line 87: warning: exported type SnykDockerData should have comment or be unexported (golint)
    • Line 95: warning: exported type SnykCodeData should have comment or be unexported (golint)
    • Line 102: warning: exported type VulnerabilityResult should have comment or be unexported (golint)
    • Line 118: warning: exported function Get should have comment or be unexported (golint)
    • Line 130: warning: exported function Persist should have comment or be unexported (golint)
    • Line 145: warning: exported function Update should have comment or be unexported (golint)
    • Line 161: warning: exported function Encode should have comment or be unexported (golint)
    • Line 176: warning: exported function Decode should have comment or be unexported (golint)
    • release-manager/internal/s3storage/s3events.go
    • Line 13: warning: exported method S3Event.Unmarshal should have comment or be unexported (golint)
    • Line 17: warning: exported type S3EventRecord should have comment or be unexported (golint)
    • Line 29: warning: exported type S3EventRecordIdentity should have comment or be unexported (golint)
    • Line 33: warning: exported type S3EventRecordData should have comment or be unexported (golint)
    • Line 40: warning: exported type S3EventRecordDataBucket should have comment or be unexported (golint)
    • Line 46: warning: exported type S3EventRecordDataObject should have comment or be unexported (golint)
    • release-manager/internal/policy/policy.go
    • Line 34: warning: exported type Service should have comment or be unexported (golint)
    • Line 42: warning: exported type GitService should have comment or be unexported (golint)
    • Line 48: warning: exported type Actor should have comment or be unexported (golint)
    • Line 313: warning: exported type Policies should have comment or be unexported (golint)
    • Line 319: warning: exported type AutoReleasePolicy should have comment or be unexported (golint)
    • release-manager/internal/grafana/grafana.go
    • Line 15: warning: exported type Service should have comment or be unexported (golint)
    • Line 19: warning: exported type Environment should have comment or be unexported (golint)
    • Line 24: warning: exported type AnnotateRequest should have comment or be unexported (golint)
    • Line 30: warning: exported type AnnotateResponse should have comment or be unexported (golint)
    • Line 35: warning: exported method Service.Annotate should have comment or be unexported (golint)
    • release-manager/internal/s3storage/s3storage.go
    • Line 18: warning: exported type Service should have comment or be unexported (golint)
    • Line 30: warning: exported function New should have comment or be unexported (golint)
    • Line 136: warning: exported method Service.InitializeBucket should have comment or be unexported (golint)
    • Line 150: warning: exported method Service.CreateArtifact should have comment or be unexported (golint)
    • release-manager/internal/slack/slack.go
    • Line 14: warning: exported type SlackClient should have comment or be unexported (golint)
    • Line 21: warning: exported type Client should have comment or be unexported (golint)
    • Line 28: warning: exported type MuteOptions should have comment or be unexported (golint)
    • Line 44: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 70: warning: exported function NewMuteableClient should have comment or be unexported (golint)
    • Line 96: warning: exported method Client.UpdateSlackBuildStatus should have comment or be unexported (golint)
    • Line 116: warning: exported method Client.PostSlackBuildStarted should have comment or be unexported (golint)
    • Line 141: warning: exported type ReleaseOptions should have comment or be unexported (golint)
    • Line 153: warning: exported method Client.NotifySlackReleasesChannel should have comment or be unexported (golint)
    • Line 173: warning: exported type BuildsOptions should have comment or be unexported (golint)
    • Line 185: warning: exported method Client.NotifySlackBuildsChannel should have comment or be unexported (golint)
    • Line 201: warning: exported method Client.NotifySlackPolicyFailed should have comment or be unexported (golint)
    • Line 224: warning: exported method Client.NotifySlackPolicySucceeded should have comment or be unexported (golint)
    • Line 247: warning: exported method Client.NotifyAuthorEventProcessed should have comment or be unexported (golint)
    • Line 269: warning: exported method Client.NotifyFluxEventProcessed should have comment or be unexported (golint)
    • Line 291: warning: exported method Client.NotifyFluxErrorEvent should have comment or be unexported (golint)
    • Line 313: warning: exported method Client.NotifyK8SDeployEvent should have comment or be unexported (golint)
    • Line 335: warning: exported method Client.NotifyK8SPodErrorEvent should have comment or be unexported (golint)
    • Line 366: warning: exported method Client.NotifyK8SJobErrorEvent should have comment or be unexported (golint)
    • Line 397: warning: exported method Client.NotifyReleaseManagerError should have comment or be unexported (golint)
    • release-manager/internal/flow/flow.go
    • Line 33: warning: exported var ErrUnknownEnvironment should have comment or be unexported (golint)
    • Line 40: warning: exported type Service should have comment or be unexported (golint)
    • Line 60: warning: exported type NotifyReleaseOptions should have comment or be unexported (golint)
    • Line 68: warning: exported type GitService should have comment or be unexported (golint)
    • Line 96: warning: exported type Environment should have comment or be unexported (golint)
    • Line 108: warning: exported type StatusResponse should have comment or be unexported (golint)
    • Line 115: warning: exported type Actor should have comment or be unexported (golint)
    • Line 120: warning: exported method Service.Status should have comment or be unexported (golint)
    • release-manager/internal/s3storage/artifactreadstorage.go
    • Line 19: warning: exported method Service.ArtifactExists should have comment or be unexported (golint)
    • Line 34: warning: exported method Service.ArtifactSpecification should have comment or be unexported (golint)
    • Line 38: warning: exported method Service.ArtifactPaths should have comment or be unexported (golint)
    • Line 51: warning: exported method Service.LatestArtifactSpecification should have comment or be unexported (golint)
    • Line 61: warning: exported method Service.LatestArtifactPaths should have comment or be unexported (golint)
    • Line 77: warning: exported method Service.ArtifactSpecifications should have comment or be unexported (golint)
    • release-manager/internal/flow/release.go
    • Line 33: warning: exported type ReleaseArtifactIDEvent should have comment or be unexported (golint)
    • Line 43: warning: exported method ReleaseArtifactIDEvent.Type should have comment or be unexported (golint)
    • Line 47: warning: exported method ReleaseArtifactIDEvent.Marshal should have comment or be unexported (golint)
    • Line 51: warning: exported method ReleaseArtifactIDEvent.Unmarshal should have comment or be unexported (golint)
    • Line 140: warning: exported method Service.ExecReleaseArtifactID should have comment or be unexported (golint)
    • release-manager/internal/flux/upstream_event.go
    • Line 17: warning: exported const EventCommit should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type Event should have comment or be unexported (golint)
    • Line 77: warning: exported type ResourceError should have comment or be unexported (golint)
    • Line 89: warning: exported type UnknownEventMetadata should have comment or be unexported (golint)
    • Line 91: warning: exported method Event.UnmarshalJSON should have comment or be unexported (golint)
    • Line 148: warning: exported method CommitEventMetadata.Type should have comment or be unexported (golint)
    • Line 152: warning: exported method SyncEventMetadata.Type should have comment or be unexported (golint)
    • Line 156: warning: comment on exported method UnknownEventMetadata.Type should be of the form "Type ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell89%

Misspell Finds commonly misspelled English words