Preparing report...

Report for github.com/kyma-project/rafter

A+    Excellent!    Found 51 issues across 124 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!


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.


golint58%

Golint is a linter for Go source code.

    • rafter/internal/assethook/metadata_engine.go
    • Line 22: warning: comment on exported type MetadataExtractor should be of the form "MetadataExtractor ..." (with optional leading article) (golint)
    • Line 27: warning: exported type File should have comment or be unexported (golint)
    • Line 38: warning: exported function NewMetadataExtractor should have comment or be unexported (golint)
    • rafter/tests/pkg/file/file.go
    • Line 23: warning: exported function CompareLocalAndRemote should have comment or be unexported (golint)
    • Line 37: warning: exported function Exists should have comment or be unexported (golint)
    • Line 52: warning: exported function Open should have comment or be unexported (golint)
    • rafter/internal/fileheader/fileheader.go
    • Line 8: warning: comment on exported type FileHeader should be of the form "FileHeader ..." (with optional leading article) (golint)
    • Line 15: warning: comment on exported type File should be of the form "File ..." (with optional leading article) (golint)
    • Line 39: warning: exported function FromMultipart should have comment or be unexported (golint)
    • rafter/internal/store/store.go
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 29: warning: comment on exported type MinioClient should be of the form "MinioClient ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported type Store should be of the form "Store ..." (with optional leading article) (golint)
    • Line 59: warning: exported function New should have comment or be unexported (golint)
    • rafter/internal/finalizer/finalizer.go
    • Line 7: warning: exported type FinalizerManager should have comment or be unexported (golint)
    • Line 12: warning: exported type Finalizer should have comment or be unexported (golint)
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • rafter/internal/route/extract.go
    • Line 37: warning: exported type ExtractHandler should have comment or be unexported (golint)
    • Line 56: warning: exported type Response should have comment or be unexported (golint)
    • Line 61: warning: exported function NewExtractHandler should have comment or be unexported (golint)
    • rafter/internal/assethook/api/v1alpha1/metadata_types.go
    • Line 5: warning: comment on exported type MetadataResultError should be of the form "MetadataResultError ..." (with optional leading article) (golint)
    • Line 11: warning: comment on exported type MetadataResultSuccess should be of the form "MetadataResultSuccess ..." (with optional leading article) (golint)
    • Line 17: warning: exported type MetadataResponse should have comment or be unexported (golint)
    • rafter/internal/assethook/processor.go
    • Line 21: warning: exported type Result should have comment or be unexported (golint)
    • Line 26: warning: exported type Message should have comment or be unexported (golint)
    • Line 40: warning: comment on exported type HttpClient should be of the form "HttpClient ..." (with optional leading article) (golint)
    • rafter/internal/controllers/clusterbucket_controller.go
    • Line 38: warning: exported type ClusterBucketConfig should have comment or be unexported (golint)
    • Line 44: warning: exported function NewClusterBucket should have comment or be unexported (golint)
    • Line 65: warning: exported method ClusterBucketReconciler.Reconcile should have comment or be unexported (golint)
    • Line 182: warning: exported method ClusterBucketReconciler.SetupWithManager should have comment or be unexported (golint)
    • rafter/tests/pkg/configmap/configmap.go
    • Line 18: warning: exported type Configmap should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • Line 32: warning: exported method Configmap.Create should have comment or be unexported (golint)
    • Line 80: warning: exported method Configmap.DeleteAll should have comment or be unexported (golint)
    • rafter/internal/controllers/clusterassetgroup_controller.go
    • Line 31: warning: exported type ClusterAssetGroupConfig should have comment or be unexported (golint)
    • Line 36: warning: exported function NewClusterAssetGroup should have comment or be unexported (golint)
    • Line 61: warning: exported method ClusterAssetGroupReconciler.Reconcile should have comment or be unexported (golint)
    • Line 105: warning: exported method ClusterAssetGroupReconciler.SetupWithManager should have comment or be unexported (golint)
    • rafter/internal/loader/loader.go
    • Line 29: warning: comment on exported type Loader should be of the form "Loader ..." (with optional leading article) (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • rafter/pkg/apis/rafter/v1beta1/bucket_common_types.go
    • Line 16: warning: comment on exported type BucketRegion should be of the form "BucketRegion ..." (with optional leading article) (golint)
    • Line 20: warning: exported const BucketRegionUSEast1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: comment on exported type BucketPolicy should be of the form "BucketPolicy ..." (with optional leading article) (golint)
    • Line 35: warning: exported const BucketPolicyNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported type BucketPhase should have comment or be unexported (golint)
    • Line 62: warning: exported type BucketReason should have comment or be unexported (golint)
    • Line 65: warning: exported const BucketNotFound should have comment (or a comment on this block) or be unexported (golint)
    • Line 79: warning: exported method BucketReason.Message should have comment or be unexported (golint)
    • rafter/pkg/processor/processor.go
    • Line 16: warning: exported type Job should have comment or be unexported (golint)
    • Line 21: warning: comment on exported type ResultSuccess should be of the form "ResultSuccess ..." (with optional leading article) (golint)
    • Line 62: warning: comment on exported method Processor.Do should be of the form "Do ..." (golint)
    • rafter/internal/controllers/bucket_controller.go
    • Line 38: warning: exported type BucketConfig should have comment or be unexported (golint)
    • Line 44: warning: exported function NewBucket should have comment or be unexported (golint)
    • Line 65: warning: exported method BucketReconciler.Reconcile should have comment or be unexported (golint)
    • Line 182: warning: exported method BucketReconciler.SetupWithManager should have comment or be unexported (golint)
    • rafter/cmd/manager/main.go
    • Line 43: warning: exported type Config should have comment or be unexported (golint)
    • Line 185: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • rafter/internal/handler/asset/asset.go
    • Line 21: warning: exported type Handler should have comment or be unexported (golint)
    • Line 25: warning: exported type MetaAccessor should have comment or be unexported (golint)
    • Line 38: warning: exported type FindBucketStatus should have comment or be unexported (golint)
    • Line 52: warning: exported function New should have comment or be unexported (golint)
    • rafter/internal/handler/assetgroup/assetgroup.go
    • Line 22: warning: exported type CommonAsset should have comment or be unexported (golint)
    • Line 39: warning: comment on exported type AssetService should be of the form "AssetService ..." (with optional leading article) (golint)
    • Line 47: warning: comment on exported type BucketService should be of the form "BucketService ..." (with optional leading article) (golint)
    • Line 53: warning: exported type Handler should have comment or be unexported (golint)
    • Line 57: warning: exported type ObjectMetaAccessor should have comment or be unexported (golint)
    • Line 71: warning: exported function New should have comment or be unexported (golint)
    • rafter/internal/configurer/configurer.go
    • Line 13: warning: exported type Config should have comment or be unexported (golint)
    • Line 19: warning: exported type SharedAppConfig should have comment or be unexported (golint)
    • Line 23: warning: exported type Configurer should have comment or be unexported (golint)
    • Line 28: warning: exported function New should have comment or be unexported (golint)
    • Line 35: warning: exported method Configurer.Load should have comment or be unexported (golint)
    • Line 54: warning: exported method Configurer.Save should have comment or be unexported (golint)
    • rafter/internal/uploader/uploader.go
    • Line 20: warning: comment on exported type MinioClient should be of the form "MinioClient ..." (with optional leading article) (golint)
    • Line 26: warning: exported type FileUpload should have comment or be unexported (golint)
    • Line 32: warning: exported type UploadResult should have comment or be unexported (golint)
    • Line 39: warning: exported type UploadError should have comment or be unexported (golint)
    • Line 215: warning: exported function Origin should have comment or be unexported (golint)
    • rafter/tests/pkg/retry/retry.go
    • Line 13: warning: exported var DefaultBackoff should have comment or be unexported (golint)
    • Line 50: warning: exported function WithIgnoreOnAlreadyExist should have comment or be unexported (golint)
    • Line 54: warning: exported function WithIgnoreOnNotFound should have comment or be unexported (golint)
    • Line 58: warning: exported function OnTimeout should have comment or be unexported (golint)
    • rafter/internal/requesthandler/requesthandler.go
    • Line 21: warning: exported type RequestHandler should have comment or be unexported (golint)
    • Line 29: warning: exported type Response should have comment or be unexported (golint)
    • Line 34: warning: exported type ResponseError should have comment or be unexported (golint)
    • Line 54: warning: exported function SetupHandlers should have comment or be unexported (golint)
    • Line 61: warning: exported function New should have comment or be unexported (golint)
    • rafter/internal/source/sources.go
    • Line 5: warning: comment on exported function IndexByType should be of the form "IndexByType ..." (golint)
    • Line 17: warning: comment on exported function FilterByType should be of the form "FilterByType ..." (golint)
    • rafter/pkg/apis/rafter/v1beta1/asset_common_types.go
    • Line 28: warning: exported type AssetPhase should have comment or be unexported (golint)
    • Line 31: warning: exported const AssetReady should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported type AssetStatusRef should have comment or be unexported (golint)
    • Line 41: warning: exported type AssetFile should have comment or be unexported (golint)
    • Line 46: warning: exported type WebhookService should have comment or be unexported (golint)
    • Line 56: warning: exported type AssetWebhookService should have comment or be unexported (golint)
    • Line 61: warning: comment on exported type AssetMode should be of the form "AssetMode ..." (with optional leading article) (golint)
    • Line 65: warning: exported const AssetSingle should have comment (or a comment on this block) or be unexported (golint)
    • Line 71: warning: exported type AssetBucketRef should have comment or be unexported (golint)
    • Line 75: warning: exported type AssetSource should have comment or be unexported (golint)
    • Line 91: warning: exported type AssetReason should have comment or be unexported (golint)
    • Line 94: warning: exported const AssetPulled should have comment (or a comment on this block) or be unexported (golint)
    • Line 119: warning: exported method AssetReason.Message should have comment or be unexported (golint)
    • rafter/pkg/fileheader/fileheader.go
    • Line 8: warning: comment on exported type FileHeader should be of the form "FileHeader ..." (with optional leading article) (golint)
    • Line 15: warning: comment on exported type File should be of the form "File ..." (with optional leading article) (golint)
    • Line 39: warning: exported function FromMultipart should have comment or be unexported (golint)
    • rafter/tests/pkg/namespace/namespace.go
    • Line 13: warning: exported type Namespace should have comment or be unexported (golint)
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • Line 22: warning: exported method Namespace.Create should have comment or be unexported (golint)
    • Line 37: warning: exported method Namespace.Delete should have comment or be unexported (golint)
    • rafter/tests/pkg/upload/upload.go
    • Line 16: warning: exported type Response should have comment or be unexported (golint)
    • Line 21: warning: exported type Result should have comment or be unexported (golint)
    • Line 28: warning: exported type Error should have comment or be unexported (golint)
    • Line 33: warning: exported type UploadInput should have comment or be unexported (golint)
    • Line 39: warning: exported function Do should have comment or be unexported (golint)
    • rafter/internal/webhookconfig/asset_webhook_config_service.go
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 20: warning: exported type AssetWebhookConfigMap should have comment or be unexported (golint)
    • Line 22: warning: exported type WebhookService should have comment or be unexported (golint)
    • Line 32: warning: exported type AssetWebhookService should have comment or be unexported (golint)
    • Line 37: warning: exported type AssetWebhookConfig should have comment or be unexported (golint)
    • Line 49: warning: comment on exported type AssetWebhookConfigService should be of the form "AssetWebhookConfigService ..." (with optional leading article) (golint)
    • Line 54: warning: comment on exported type ResourceGetter should be of the form "ResourceGetter ..." (with optional leading article) (golint)
    • Line 59: warning: exported function New should have comment or be unexported (golint)
    • rafter/internal/controllers/clusterasset_controller.go
    • Line 43: warning: exported type ClusterAssetConfig should have comment or be unexported (golint)
    • Line 48: warning: exported function NewClusterAsset should have comment or be unexported (golint)
    • Line 73: warning: exported method ClusterAssetReconciler.Reconcile should have comment or be unexported (golint)
    • Line 209: warning: exported method ClusterAssetReconciler.SetupWithManager should have comment or be unexported (golint)
    • rafter/internal/handler/bucket/bucket.go
    • Line 18: warning: exported type Handler should have comment or be unexported (golint)
    • Line 22: warning: exported type MetaAccessor should have comment or be unexported (golint)
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • rafter/internal/controllers/asset_controller.go
    • Line 43: warning: exported type AssetConfig should have comment or be unexported (golint)
    • Line 48: warning: exported function NewAsset should have comment or be unexported (golint)
    • Line 73: warning: exported method AssetReconciler.Reconcile should have comment or be unexported (golint)
    • Line 190: warning: exported method AssetReconciler.SetupWithManager should have comment or be unexported (golint)
    • rafter/pkg/apis/rafter/v1beta1/assetgroup_common.go
    • Line 8: warning: exported type CommonAssetGroupSpec should have comment or be unexported (golint)
    • Line 16: warning: exported type AssetGroupBucketRef should have comment or be unexported (golint)
    • Line 20: warning: comment on exported type AssetGroupSourceMode should be of the form "AssetGroupSourceMode ..." (with optional leading article) (golint)
    • Line 24: warning: exported const AssetGroupSingle should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: comment on exported type AssetGroupSourceName should be of the form "AssetGroupSourceName ..." (with optional leading article) (golint)
    • Line 32: warning: comment on exported type AssetGroupSourceType should be of the form "AssetGroupSourceType ..." (with optional leading article) (golint)
    • Line 35: warning: exported type Source should have comment or be unexported (golint)
    • Line 47: warning: comment on exported type AssetGroupPhase should be of the form "AssetGroupPhase ..." (with optional leading article) (golint)
    • Line 51: warning: exported const AssetGroupPending should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported type CommonAssetGroupStatus should have comment or be unexported (golint)
    • Line 63: warning: exported type AssetGroupReason should have comment or be unexported (golint)
    • Line 66: warning: exported const AssetGroupAssetCreated should have comment (or a comment on this block) or be unexported (golint)
    • Line 87: warning: exported method AssetGroupReason.Message should have comment or be unexported (golint)
    • rafter/internal/bucket/handler.go
    • Line 20: warning: comment on exported type BucketClient should be of the form "BucketClient ..." (with optional leading article) (golint)
    • Line 47: warning: comment on exported function NewHandler should be of the form "NewHandler ..." (golint)
    • Line 83: warning: comment on exported method Handler.CreateIfDoesntExist should be of the form "CreateIfDoesntExist ..." (golint)
    • rafter/tests/pkg/resource/resource.go
    • Line 20: warning: exported type Resource should have comment or be unexported (golint)
    • Line 28: warning: exported function New should have comment or be unexported (golint)
    • Line 33: warning: exported method Resource.Create should have comment or be unexported (golint)
    • Line 60: warning: exported method Resource.Get should have comment or be unexported (golint)
    • Line 80: warning: exported method Resource.Delete should have comment or be unexported (golint)
    • rafter/internal/controllers/assetgroup_controller.go
    • Line 31: warning: exported type AssetGroupConfig should have comment or be unexported (golint)
    • Line 36: warning: exported function NewAssetGroup should have comment or be unexported (golint)
    • Line 61: warning: exported method AssetGroupReconciler.Reconcile should have comment or be unexported (golint)
    • Line 94: warning: exported method AssetGroupReconciler.SetupWithManager should have comment or be unexported (golint)
    • rafter/tests/testsuite/testsuite.go
    • Line 25: warning: exported type Config should have comment or be unexported (golint)
    • Line 35: warning: exported type TestSuite should have comment or be unexported (golint)
    • Line 58: warning: exported function New should have comment or be unexported (golint)
    • Line 104: warning: exported method TestSuite.Run should have comment or be unexported (golint)
    • Line 200: warning: exported method TestSuite.Cleanup 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!