Preparing report...

Report for github.com/fluxcd/source-controller

(v0.21.2)

A+    Excellent!    Found 24 issues across 59 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!


gocyclo76%

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.

    • controllers/helmchart_controller.go
    • Line 115: warning: cyclomatic complexity 28 of function (*HelmChartReconciler).Reconcile() is high (> 15) (gocyclo)
    • Line 400: warning: cyclomatic complexity 22 of function (*HelmChartReconciler).fromTarballArtifact() is high (> 15) (gocyclo)
    • Line 299: warning: cyclomatic complexity 16 of function (*HelmChartReconciler).fromHelmRepository() is high (> 15) (gocyclo)
    • internal/fs/fs.go
    • Line 309: warning: cyclomatic complexity 20 of function volumeName() is high (> 15) (gocyclo)
    • Line 225: warning: cyclomatic complexity 18 of function fixLongPath() is high (> 15) (gocyclo)
    • controllers/gitrepository_controller.go
    • Line 223: warning: cyclomatic complexity 28 of function (*GitRepositoryReconciler).reconcile() is high (> 15) (gocyclo)
    • Line 89: warning: cyclomatic complexity 19 of function (*GitRepositoryReconciler).Reconcile() is high (> 15) (gocyclo)
    • controllers/helmrepository_controller.go
    • Line 176: warning: cyclomatic complexity 18 of function (*HelmRepositoryReconciler).reconcile() is high (> 15) (gocyclo)
    • Line 82: warning: cyclomatic complexity 16 of function (*HelmRepositoryReconciler).Reconcile() is high (> 15) (gocyclo)
    • controllers/bucket_controller.go
    • Line 277: warning: cyclomatic complexity 16 of function (*BucketReconciler).reconcileWithGCP() is high (> 15) (gocyclo)
    • Line 86: warning: cyclomatic complexity 16 of function (*BucketReconciler).Reconcile() is high (> 15) (gocyclo)

golint72%

Golint is a linter for Go source code.

    • controllers/helmchart_controller.go
    • Line 78: warning: exported method HelmChartReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 82: warning: exported method HelmChartReconciler.SetupWithManagerAndOptions should have comment or be unexported (golint)
    • Line 115: warning: exported method HelmChartReconciler.Reconcile should have comment or be unexported (golint)
    • Line 260: warning: exported type HelmChartReconcilerOptions should have comment or be unexported (golint)
    • pkg/git/libgit2/checkout.go
    • Line 58: warning: exported type CheckoutBranch should have comment or be unexported (golint)
    • Line 62: warning: exported method CheckoutBranch.Checkout should have comment or be unexported (golint)
    • Line 88: warning: exported type CheckoutTag should have comment or be unexported (golint)
    • Line 92: warning: exported method CheckoutTag.Checkout should have comment or be unexported (golint)
    • Line 112: warning: exported type CheckoutCommit should have comment or be unexported (golint)
    • Line 116: warning: exported method CheckoutCommit.Checkout should have comment or be unexported (golint)
    • Line 139: warning: exported type CheckoutSemVer should have comment or be unexported (golint)
    • Line 143: warning: exported method CheckoutSemVer.Checkout should have comment or be unexported (golint)
    • internal/helm/chart/dependency_manager.go
    • Line 67: warning: exported type WithRepositories should have comment or be unexported (golint)
    • Line 73: warning: exported type WithRepositoryCallback should have comment or be unexported (golint)
    • Line 79: warning: exported type WithConcurrent should have comment or be unexported (golint)
    • controllers/gitrepository_controller.go
    • Line 69: warning: exported type GitRepositoryReconcilerOptions should have comment or be unexported (golint)
    • Line 74: warning: exported method GitRepositoryReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 78: warning: exported method GitRepositoryReconciler.SetupWithManagerAndOptions should have comment or be unexported (golint)
    • Line 89: warning: exported method GitRepositoryReconciler.Reconcile should have comment or be unexported (golint)
    • controllers/helmrepository_controller.go
    • Line 66: warning: exported type HelmRepositoryReconcilerOptions should have comment or be unexported (golint)
    • Line 70: warning: exported method HelmRepositoryReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 74: warning: exported method HelmRepositoryReconciler.SetupWithManagerAndOptions should have comment or be unexported (golint)
    • Line 82: warning: exported method HelmRepositoryReconciler.Reconcile should have comment or be unexported (golint)
    • controllers/source_predicate.go
    • Line 26: warning: exported type SourceRevisionChangePredicate should have comment or be unexported (golint)
    • Line 30: warning: exported method SourceRevisionChangePredicate.Update should have comment or be unexported (golint)
    • Line 57: warning: exported method SourceRevisionChangePredicate.Create should have comment or be unexported (golint)
    • Line 61: warning: exported method SourceRevisionChangePredicate.Delete should have comment or be unexported (golint)
    • pkg/git/git.go
    • Line 29: warning: exported type Implementation should have comment or be unexported (golint)
    • Line 31: warning: exported type Hash should have comment or be unexported (golint)
    • Line 38: warning: exported type Signature should have comment or be unexported (golint)
    • Line 44: warning: exported type Commit should have comment or be unexported (golint)
    • Line 96: warning: exported type CheckoutStrategy should have comment or be unexported (golint)
    • pkg/git/options.go
    • Line 27: warning: exported const DefaultOrigin should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: exported type TransportType should have comment or be unexported (golint)
    • Line 56: warning: exported const SSH should have comment (or a comment on this block) or be unexported (golint)
    • pkg/git/gogit/gogit.go
    • Line 22: warning: exported const Implementation should have comment (or a comment on this block) or be unexported (golint)
    • pkg/git/gogit/checkout.go
    • Line 57: warning: exported type CheckoutBranch should have comment or be unexported (golint)
    • Line 62: warning: exported method CheckoutBranch.Checkout should have comment or be unexported (golint)
    • Line 95: warning: exported type CheckoutTag should have comment or be unexported (golint)
    • Line 100: warning: exported method CheckoutTag.Checkout should have comment or be unexported (golint)
    • Line 133: warning: exported type CheckoutCommit should have comment or be unexported (golint)
    • Line 139: warning: exported method CheckoutCommit.Checkout should have comment or be unexported (golint)
    • Line 181: warning: exported type CheckoutSemVer should have comment or be unexported (golint)
    • Line 186: warning: exported method CheckoutSemVer.Checkout should have comment or be unexported (golint)
    • controllers/bucket_controller.go
    • Line 70: warning: exported type BucketReconcilerOptions should have comment or be unexported (golint)
    • Line 74: warning: exported method BucketReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 78: warning: exported method BucketReconciler.SetupWithManagerAndOptions should have comment or be unexported (golint)
    • Line 86: warning: exported method BucketReconciler.Reconcile should have comment or be unexported (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!