Preparing report...

Report for github.com/gimlet-io/gimletd

(v0.8.0)

A+    Excellent!    Found 41 issues across 68 files

Tweet

gofmt94%

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!


gocyclo94%

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.

    • client/client.go
    • Line 79: warning: cyclomatic complexity 17 of function (*client).ArtifactsGet() is high (> 15) (gocyclo)

golint44%

Golint is a linter for Go source code.

    • store/gitopsCommit.go
    • Line 10: warning: exported method Store.GitopsCommit should have comment or be unexported (golint)
    • Line 24: warning: exported method Store.SaveOrUpdateGitopsCommit should have comment or be unexported (golint)
    • worker/gitops.go
    • Line 28: warning: exported type GitopsWorker should have comment or be unexported (golint)
    • Line 38: warning: exported function NewGitopsWorker should have comment or be unexported (golint)
    • Line 58: warning: exported method GitopsWorker.Run should have comment or be unexported (golint)
    • server/flux_test.go
    • Line 42: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 43: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 44: warning: should not use basic type string as key in context.WithValue (golint)
    • git/nativeGit/gitopsRepoCache.go
    • Line 1: warning: don't use MixedCaps in package name; nativeGit should be nativegit (golint)
    • Line 16: warning: exported type GitopsRepoCache should have comment or be unexported (golint)
    • Line 25: warning: exported function NewGitopsRepoCache should have comment or be unexported (golint)
    • Line 46: warning: exported method GitopsRepoCache.Run should have comment or be unexported (golint)
    • Line 84: warning: exported method GitopsRepoCache.InstanceForRead should have comment or be unexported (golint)
    • Line 88: warning: exported method GitopsRepoCache.InstanceForWrite should have comment or be unexported (golint)
    • Line 107: warning: exported method GitopsRepoCache.CleanupWrittenRepo should have comment or be unexported (golint)
    • Line 111: warning: exported method GitopsRepoCache.Invalidate should have comment or be unexported (golint)
    • dx/artifact.go
    • Line 9: warning: exported type Version should have comment or be unexported (golint)
    • Line 48: warning: exported method Artifact.HasCleanupPolicy should have comment or be unexported (golint)
    • Line 57: warning: exported method Artifact.Vars should have comment or be unexported (golint)
    • Line 74: warning: exported method Artifact.CueEnvironmentsToManifests should have comment or be unexported (golint)
    • notifications/slack.go
    • Line 21: warning: exported type SlackProvider should have comment or be unexported (golint)
    • Line 33: warning: exported type Block should have comment or be unexported (golint)
    • Line 39: warning: exported type Text should have comment or be unexported (golint)
    • server/router.go
    • Line 18: warning: exported function SetupRouter should have comment or be unexported (golint)
    • Line 86: warning: exported type GitopsRepoResult should have comment or be unexported (golint)
    • worker/events/events.go
    • Line 7: warning: exported type Status should have comment or be unexported (golint)
    • Line 10: warning: exported const Success should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type DeployEvent should have comment or be unexported (golint)
    • Line 26: warning: exported type RollbackEvent should have comment or be unexported (golint)
    • Line 36: warning: exported type DeleteEvent should have comment or be unexported (golint)
    • git/nativeGit/commit_walker_dir.go
    • Line 1: warning: don't use MixedCaps in package name; nativeGit should be nativegit (golint)
    • Line 18: warning: comment on exported function NewCommitDirIterFromIter should be of the form "NewCommitDirIterFromIter ..." (golint)
    • store/keyValues.go
    • Line 36: warning: exported method Store.ReposWithCleanupPolicy should have comment or be unexported (golint)
    • Line 50: warning: exported method Store.SaveReposWithCleanupPolicy should have comment or be unexported (golint)
    • worker/branchDeleteEvent.go
    • Line 28: warning: don't use underscores in Go names; const Dir_RWX_RX_R should be DirRWXRXR (golint)
    • Line 28: warning: exported const Dir_RWX_RX_R should have comment or be unexported (golint)
    • Line 34: warning: exported type BranchDeleteEventWorker should have comment or be unexported (golint)
    • Line 40: warning: exported function NewBranchDeleteEventWorker should have comment or be unexported (golint)
    • Line 54: warning: exported method BranchDeleteEventWorker.Run should have comment or be unexported (golint)
    • Line 265: warning: error should be the last type when returning multiple items (golint)
    • dx/gitEvent.go
    • Line 74: warning: exported function PushPtr should have comment or be unexported (golint)
    • Line 79: warning: exported function TagPtr should have comment or be unexported (golint)
    • Line 84: warning: exported function PRPtr should have comment or be unexported (golint)
    • dx/helm.go
    • Line 155: warning: exported function TemplateChart should have comment or be unexported (golint)
    • Line 182: warning: exported function GetTemplatedManifests should have comment or be unexported (golint)
    • cmd/config/config.go
    • Line 40: warning: exported type Config should have comment or be unexported (golint)
    • Line 54: warning: exported type Database should have comment or be unexported (golint)
    • Line 68: warning: exported type Notifications should have comment or be unexported (golint)
    • Line 75: warning: exported type Github should have comment or be unexported (golint)
    • Line 83: warning: exported type Multiline should have comment or be unexported (golint)
    • Line 85: warning: exported method Multiline.Decode should have comment or be unexported (golint)
    • git/nativeGit/helper.go
    • Line 1: warning: don't use MixedCaps in package name; nativeGit should be nativegit (golint)
    • Line 27: warning: don't use underscores in Go names; const File_RW_RW_R should be FileRWRWR (golint)
    • Line 27: warning: exported const File_RW_RW_R should have comment or be unexported (golint)
    • Line 28: warning: don't use underscores in Go names; const Dir_RWX_RX_R should be DirRWXRXR (golint)
    • Line 28: warning: exported const Dir_RWX_RX_R should have comment or be unexported (golint)
    • Line 30: warning: exported function CloneToTmpFs should have comment or be unexported (golint)
    • Line 54: warning: exported function TmpFsCleanup should have comment or be unexported (golint)
    • Line 58: warning: exported function Push should have comment or be unexported (golint)
    • Line 79: warning: exported function NothingToCommit should have comment or be unexported (golint)
    • Line 93: warning: exported function Commit should have comment or be unexported (golint)
    • Line 114: warning: exported function NativeRevert should have comment or be unexported (golint)
    • Line 118: warning: exported function NativePush should have comment or be unexported (golint)
    • Line 166: warning: exported function DelDir should have comment or be unexported (golint)
    • Line 198: warning: exported function StageFolder should have comment or be unexported (golint)
    • Line 209: warning: exported function CommitFilesToGit should have comment or be unexported (golint)
    • Line 296: warning: exported function Branch should have comment or be unexported (golint)
    • Line 364: warning: exported function Releases should have comment or be unexported (golint)
    • Line 376: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 461: warning: exported function Status should have comment or be unexported (golint)
    • Line 477: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 512: warning: exported function Envs should have comment or be unexported (golint)
    • Line 559: warning: exported function RollbackCommit should have comment or be unexported (golint)
    • Line 563: warning: exported function DeleteCommit should have comment or be unexported (golint)
    • Line 567: warning: exported function HasBeenReverted should have comment or be unexported (golint)
    • dx/release.go
    • Line 43: warning: exported type ReleaseStatus should have comment or be unexported (golint)
    • notifications/manager.go
    • Line 7: warning: exported type Manager should have comment or be unexported (golint)
    • Line 12: warning: exported type ManagerImpl should have comment or be unexported (golint)
    • Line 17: warning: exported type DummyManagerImpl should have comment or be unexported (golint)
    • Line 20: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 27: warning: exported function NewDummyManager should have comment or be unexported (golint)
    • Line 31: warning: exported method ManagerImpl.Broadcast should have comment or be unexported (golint)
    • Line 35: warning: exported method DummyManagerImpl.Broadcast should have comment or be unexported (golint)
    • Line 38: warning: exported method DummyManagerImpl.AddProvider should have comment or be unexported (golint)
    • Line 41: warning: exported method ManagerImpl.AddProvider should have comment or be unexported (golint)
    • Line 45: warning: exported method ManagerImpl.Run should have comment or be unexported (golint)
    • model/event.go
    • Line 9: warning: exported const StatusNew should have comment or be unexported (golint)
    • Line 10: warning: exported const StatusProcessed should have comment or be unexported (golint)
    • Line 11: warning: exported const StatusError should have comment or be unexported (golint)
    • Line 13: warning: exported const TypeArtifact should have comment or be unexported (golint)
    • Line 14: warning: exported const TypeRelease should have comment or be unexported (golint)
    • Line 15: warning: exported const TypeRollback should have comment or be unexported (golint)
    • Line 16: warning: exported const TypeBranchDeleted should have comment or be unexported (golint)
    • Line 18: warning: exported type Event should have comment or be unexported (golint)
    • Line 38: warning: exported function ToEvent should have comment or be unexported (golint)
    • Line 58: warning: exported function ToArtifact should have comment or be unexported (golint)
    • dx/cue.go
    • Line 12: warning: exported function RenderCueToManifests should have comment or be unexported (golint)
    • server/session/session.go
    • Line 26: warning: exported function SetUser should have comment or be unexported (golint)
    • Line 43: warning: should not use basic type string as key in context.WithValue (golint)
    • server/token/token.go
    • Line 26: warning: exported type SecretFunc should have comment or be unexported (golint)
    • Line 29: warning: exported const SessToken should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported type Token should have comment or be unexported (golint)
    • Line 89: warning: exported function CheckCsrf should have comment or be unexported (golint)
    • Line 104: warning: exported function New should have comment or be unexported (golint)
    • worker/releaseState.go
    • Line 14: warning: exported type ReleaseStateWorker should have comment or be unexported (golint)
    • Line 21: warning: exported method ReleaseStateWorker.Run should have comment or be unexported (golint)
    • dx/kustomize.go
    • Line 19: warning: exported function ApplyPatches should have comment or be unexported (golint)
    • dx/manifest.go
    • Line 14: warning: exported type Manifest should have comment or be unexported (golint)
    • Line 27: warning: exported type Json6902Patch should have comment or be unexported (golint)
    • Line 32: warning: exported type Target should have comment or be unexported (golint)
    • Line 39: warning: exported type Chart should have comment or be unexported (golint)
    • Line 45: warning: exported type Deploy should have comment or be unexported (golint)
    • Line 51: warning: exported type Cleanup should have comment or be unexported (golint)
    • Line 57: warning: exported method Manifest.ResolveVars should have comment or be unexported (golint)
    • Line 89: warning: exported method Manifest.Render should have comment or be unexported (golint)
    • Line 110: warning: exported method Cleanup.ResolveVars should have comment or be unexported (golint)
    • store/sql/queries.go
    • Line 17: warning: exported const Dummy should have comment or be unexported (golint)
    • Line 18: warning: exported const SelectUserByLogin should have comment or be unexported (golint)
    • Line 19: warning: exported const SelectAllUser should have comment or be unexported (golint)
    • Line 20: warning: exported const DeleteUser should have comment or be unexported (golint)
    • Line 21: warning: exported const SelectUnprocessedEvents should have comment or be unexported (golint)
    • Line 22: warning: exported const UpdateEventStatus should have comment or be unexported (golint)
    • Line 23: warning: exported const SelectGitopsCommitBySha should have comment or be unexported (golint)
    • Line 24: warning: exported const SelectKeyValue should have comment or be unexported (golint)
    • model/gitopsCommit.go
    • Line 3: warning: exported const Progressing should have comment or be unexported (golint)
    • Line 4: warning: exported const ReconciliationSucceeded should have comment or be unexported (golint)
    • Line 5: warning: exported const ValidationFailed should have comment or be unexported (golint)
    • Line 6: warning: exported const ReconciliationFailed should have comment or be unexported (golint)
    • Line 7: warning: exported const HealthCheckFailed should have comment or be unexported (golint)
    • Line 9: warning: exported type GitopsCommit should have comment or be unexported (golint)
    • server/artifacts_test.go
    • Line 47: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 64: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 79: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 95: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 111: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 126: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 142: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 158: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 212: warning: should not use basic type string as key in context.WithValue (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!


misspell97%

Misspell Finds commonly misspelled English words

    • dx/cue.go
    • Line 24: warning: "manfiests" is a misspelling of "manifests" (misspell)