Preparing report...

Report for github.com/layer5io/meshery

A+    Excellent!    Found 41 issues across 144 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!


gocyclo93%

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.

    • meshery/models/grafana_helper.go
    • Line 133: warning: cyclomatic complexity 25 of function (*GrafanaClient).ProcessBoard() is high (> 15) (gocyclo)
    • Line 229: warning: cyclomatic complexity 21 of function (*GrafanaClient).GrafanaQuery() is high (> 15) (gocyclo)

golint81%

Golint is a linter for Go source code.

    • meshery/internal/graphql/resolver/error.go
    • Line 9: warning: exported const ErrInvalidRequestCode should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported var ErrNilClient should have comment or be unexported (golint)
    • Line 29: warning: exported function ErrCreateData should have comment or be unexported (golint)
    • Line 33: warning: exported function ErrUpdateData should have comment or be unexported (golint)
    • Line 37: warning: exported function ErrDeleteData should have comment or be unexported (golint)
    • Line 41: warning: exported function ErrQuery should have comment or be unexported (golint)
    • Line 45: warning: exported function ErrMeshsyncSubscription should have comment or be unexported (golint)
    • Line 49: warning: exported function ErrOperatorSubscription should have comment or be unexported (golint)
    • Line 53: warning: exported function ErrAddonSubscription should have comment or be unexported (golint)
    • Line 57: warning: exported function ErrControlPlaneSubscription should have comment or be unexported (golint)
    • Line 61: warning: exported function ErrSubscribeChannel should have comment or be unexported (golint)
    • Line 65: warning: exported function ErrMesheryClient should have comment or be unexported (golint)
    • meshery/mesheryctl/pkg/utils/compose.go
    • Line 3: warning: exported type K8sCompose should have comment or be unexported (golint)
    • Line 11: warning: exported type Spec should have comment or be unexported (golint)
    • Line 18: warning: exported type Template should have comment or be unexported (golint)
    • Line 23: warning: exported type TemplateSpec should have comment or be unexported (golint)
    • Line 29: warning: exported type Containers should have comment or be unexported (golint)
    • Line 37: warning: exported type DockerCompose should have comment or be unexported (golint)
    • Line 42: warning: exported type Service should have comment or be unexported (golint)
    • Line 50: warning: exported type Volumes should have comment or be unexported (golint)
    • meshery/mesheryctl/pkg/utils/helpers.go
    • Line 46: warning: exported const OperatorURL should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: comment on exported const EndpointProtocol should be of the form "EndpointProtocol ..." (golint)
    • Line 237: warning: exported function Startdockerdaemon should have comment or be unexported (golint)
    • Line 276: warning: exported function InstallprereqDocker should have comment or be unexported (golint)
    • Line 352: warning: comment on exported function NavigateToBrowser should be of the form "NavigateToBrowser ..." (golint)
    • meshery/models/bitcask_smiresults_persister.go
    • Line 58: warning: comment on exported method BitCaskSmiResultsPersister.GetResults should be of the form "GetResults ..." (golint)
    • Line 127: warning: comment on exported method BitCaskSmiResultsPersister.WriteResult should be of the form "WriteResult ..." (golint)
    • Line 158: warning: comment on exported method BitCaskSmiResultsPersister.CloseResultPersister should be of the form "CloseResultPersister ..." (golint)
    • meshery/models/meshery_filter_persister.go
    • Line 66: warning: exported method MesheryFilterPersister.SaveMesheryFilter should have comment or be unexported (golint)
    • Line 98: warning: exported method MesheryFilterPersister.GetMesheryFilter should have comment or be unexported (golint)
    • meshery/handlers/extensions.go
    • Line 15: warning: exported method Handler.ExtensionsEndpointHandler should have comment or be unexported (golint)
    • Line 24: warning: exported method Handler.LoadExtensionFromPackage should have comment or be unexported (golint)
    • meshery/models/meshery_pattern_persister.go
    • Line 66: warning: exported method MesheryPatternPersister.SaveMesheryPattern should have comment or be unexported (golint)
    • Line 98: warning: exported method MesheryPatternPersister.GetMesheryPattern should have comment or be unexported (golint)
    • meshery/models/providers.go
    • Line 21: warning: comment on exported type Router should be of the form "Router ..." (with optional leading article) (golint)
    • Line 106: warning: exported const PersistResults should have comment (or a comment on this block) or be unexported (golint)
    • meshery/models/remote_provider.go
    • Line 951: warning: exported method RemoteProvider.RemotePatternFile should have comment or be unexported (golint)
    • Line 1206: warning: exported method RemoteProvider.RemoteFilterFile should have comment or be unexported (golint)
    • meshery/models/meshery_results_persister.go
    • Line 12: warning: exported type MesheryResultsPersister should have comment or be unexported (golint)
    • Line 38: warning: exported method MesheryResultsPersister.GetResults should have comment or be unexported (golint)
    • Line 59: warning: exported method MesheryResultsPersister.GetAllResults should have comment or be unexported (golint)
    • Line 80: warning: exported method MesheryResultsPersister.GetResult should have comment or be unexported (golint)
    • Line 88: warning: exported method MesheryResultsPersister.WriteResult should have comment or be unexported (golint)
    • meshery/models/smi-test.go
    • Line 7: warning: exported type SmiResult should have comment or be unexported (golint)
    • Line 18: warning: exported type Detail should have comment or be unexported (golint)
    • meshery/models/performance_profile_persister.go
    • Line 74: warning: exported method PerformanceProfilePersister.SavePerformanceProfile should have comment or be unexported (golint)
    • Line 78: warning: exported method PerformanceProfilePersister.GetPerformanceProfile should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 2)