Preparing report...

Report for github.com/redhat-developer/service-binding-operator

A+    Excellent!    Found 26 issues across 58 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!


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.


golint58%

Golint is a linter for Go source code.

    • service-binding-operator/pkg/reconcile/pipeline/handler/collect/impl.go
    • Line 18: warning: error var DataNotMap should have name of the form ErrFoo (golint)
    • Line 18: warning: exported var DataNotMap should have comment or be unexported (golint)
    • Line 21: warning: exported const ErrorReadingServicesReason should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported function BindingDefinitions should have comment or be unexported (golint)
    • Line 65: warning: exported function BindingItems should have comment or be unexported (golint)
    • Line 139: warning: exported function OwnedResources should have comment or be unexported (golint)
    • service-binding-operator/pkg/binding/bindinginfo.go
    • Line 8: warning: exported type ErrInvalidAnnotationPrefix should have comment or be unexported (golint)
    • Line 14: warning: exported function IsErrInvalidAnnotationPrefix should have comment or be unexported (golint)
    • Line 19: warning: exported var ErrInvalidAnnotationName should have comment or be unexported (golint)
    • Line 21: warning: exported type ErrEmptyAnnotationName should have comment or be unexported (golint)
    • Line 27: warning: exported function IsErrEmptyAnnotationName should have comment or be unexported (golint)
    • service-binding-operator/pkg/reconcile/pipeline/handler/project/impl.go
    • Line 16: warning: exported function PreFlightCheck should have comment or be unexported (golint)
    • Line 30: warning: exported function PostFlightCheck should have comment or be unexported (golint)
    • Line 34: warning: exported function InjectSecretRef should have comment or be unexported (golint)
    • Line 50: warning: exported function BindingsAsEnv should have comment or be unexported (golint)
    • Line 104: warning: exported function BindingsAsFiles should have comment or be unexported (golint)
    • Line 221: warning: exported function Unbind should have comment or be unexported (golint)
    • service-binding-operator/test/mocks/fake.go
    • Line 69: warning: comment on exported method Fake.AddMockedUnstructuredServiceBindingWithoutService should be of the form "AddMockedUnstructuredServiceBindingWithoutService ..." (golint)
    • Line 138: warning: exported method Fake.AddMockedUnstructuredDatabaseCR should have comment or be unexported (golint)
    • Line 168: warning: exported method Fake.AddMockedUnstructuredDatabaseCRD should have comment or be unexported (golint)
    • Line 177: warning: exported method Fake.AddMockedUnstructuredPostgresDatabaseCR should have comment or be unexported (golint)
    • Line 192: warning: comment on exported method Fake.AddMockedUnstructuredSecretRV should be of the form "AddMockedUnstructuredSecretRV ..." (golint)
    • Line 214: warning: exported method Fake.AddMockResource should have comment or be unexported (golint)
    • service-binding-operator/api/v1alpha1/servicebinding_types.go
    • Line 45: warning: exported const BindingInjectedReason should have comment (or a comment on this block) or be unexported (golint)
    • Line 103: warning: comment on exported type Mapping should be of the form "Mapping ..." (with optional leading article) (golint)
    • Line 128: warning: comment on exported type Ref should be of the form "Ref ..." (with optional leading article) (golint)
    • Line 150: warning: comment on exported type NamespacedRef should be of the form "NamespacedRef ..." (with optional leading article) (golint)
    • Line 227: warning: exported method ServiceBinding.AsOwnerReference should have comment or be unexported (golint)
    • Line 238: warning: exported method ServiceBindingSpec.NamingTemplate should have comment or be unexported (golint)
    • Line 242: 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 248: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 253: warning: comment on exported method Ref.GroupVersionResource should be of the form "GroupVersionResource ..." (golint)
    • Line 265: warning: comment on exported method Ref.GroupVersionKind should be of the form "GroupVersionKind ..." (golint)
    • Line 277: warning: exported method ServiceBinding.MaybeAddFinalizer should have comment or be unexported (golint)
    • Line 277: warning: receiver name sb should be consistent with previous receiver name sbr for ServiceBinding (golint)
    • Line 288: warning: exported method ServiceBinding.MaybeRemoveFinalizer should have comment or be unexported (golint)
    • Line 288: warning: receiver name sb should be consistent with previous receiver name sbr for ServiceBinding (golint)
    • service-binding-operator/pkg/reconcile/pipeline/api.go
    • Line 15: warning: comment on exported type Pipeline should be of the form "Pipeline ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported type Handler should be of the form "Handler ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported type FlowStatus should be of the form "FlowStatus ..." (with optional leading article) (golint)
    • Line 37: warning: exported type HasResource should have comment or be unexported (golint)
    • Line 81: warning: comment on exported type CRD should be of the form "CRD ..." (with optional leading article) (golint)
    • Line 91: warning: comment on exported type Context should be of the form "Context ..." (with optional leading article) (golint)
    • Line 152: warning: comment on exported type ContextProvider should be of the form "ContextProvider ..." (with optional leading article) (golint)
    • Line 157: warning: exported type HandlerFunc should have comment or be unexported (golint)
    • Line 159: warning: exported method HandlerFunc.Handle should have comment or be unexported (golint)
    • Line 163: warning: exported type BindingItems should have comment or be unexported (golint)
    • Line 165: warning: exported type BindingItem should have comment or be unexported (golint)
    • Line 171: warning: comment on exported method BindingItems.AsMap should be of the form "AsMap ..." (golint)
    • service-binding-operator/pkg/binding/annotationmapper.go
    • Line 11: warning: exported type UnstructuredResourceReader should have comment or be unexported (golint)
    • Line 34: warning: exported const AnnotationPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported function NewDefinitionBuilder should have comment or be unexported (golint)
    • service-binding-operator/pkg/binding/spec.go
    • Line 16: warning: comment on exported type BindingType should be of the form "BindingType ..." (with optional leading article) (golint)
    • Line 49: warning: exported function IsErrHandlerNotFound should have comment or be unexported (golint)
    • Line 54: warning: exported type SpecHandler should have comment or be unexported (golint)
    • Line 73: warning: exported method SpecHandler.Handle should have comment or be unexported (golint)
    • Line 116: warning: exported function NewSpecHandler should have comment or be unexported (golint)
    • service-binding-operator/test/mocks/mocks.go
    • Line 37: warning: exported var ImageSpecDesc should have comment or be unexported (golint)
    • Line 43: warning: comment on exported var DBNameSpecIp should be of the form "DBNameSpecIp ..." (golint)
    • Line 88: warning: exported function DatabaseCRDMock should have comment or be unexported (golint)
    • Line 120: warning: exported function UnstructuredDatabaseCRDMock should have comment or be unexported (golint)
    • Line 125: warning: exported type PostgresDatabaseSpec should have comment or be unexported (golint)
    • Line 129: warning: exported type PostgresDatabase should have comment or be unexported (golint)
    • Line 136: warning: exported function PostgresDatabaseCRMock should have comment or be unexported (golint)
    • Line 154: warning: exported function UnstructuredSecretMock should have comment or be unexported (golint)
    • Line 159: warning: exported function UnstructuredSecretMockRV should have comment or be unexported (golint)
    • Line 164: warning: exported function UnstructuredPostgresDatabaseCRMock should have comment or be unexported (golint)
    • Line 298: warning: exported function RouteCRMock 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!


misspell96%

Misspell Finds commonly misspelled English words