Preparing report...

Report for github.com/open-cluster-management/multicloud-operators-placementrule

A+    Excellent!    Found 12 issues across 48 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!


gocyclo100%

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.

No problems detected. Good job!


golint75%

Golint is a linter for Go source code.

    • multicloud-operators-placementrule/pkg/controller/gitopscluster/gitopscluster_controller.go
    • Line 165: warning: exported method ReconcileGitOpsCluster.Reconcile should have comment or be unexported (golint)
    • Line 593: warning: exported method ReconcileGitOpsCluster.MigrateManagedClusterSecrets should have comment or be unexported (golint)
    • Line 669: warning: exported method ReconcileGitOpsCluster.CheckAndDisableInKlusterletAddonConfig should have comment or be unexported (golint)
    • Line 713: warning: exported method ReconcileGitOpsCluster.CreateMigrationPlacement should have comment or be unexported (golint)
    • Line 762: warning: exported method ReconcileGitOpsCluster.CreateMigrationGitOpsCluster should have comment or be unexported (golint)
    • multicloud-operators-placementrule/pkg/utils/auth.go
    • Line 33: warning: exported var AdminUsers should have comment or be unexported (golint)
    • Line 37: warning: exported function FilteClustersByIdentity should have comment or be unexported (golint)
    • Line 128: warning: exported function ExtractUserAndGroup should have comment or be unexported (golint)
    • Line 152: warning: exported function IfClusterAdmin should have comment or be unexported (golint)
    • multicloud-operators-placementrule/pkg/utils/cluster.go
    • Line 34: warning: comment on exported const ACMClusterSecretLabel should be of the form "ACMClusterSecretLabel ..." (golint)
    • Line 36: warning: comment on exported const ArgocdClusterSecretLabel should be of the form "ArgocdClusterSecretLabel ..." (golint)
    • Line 38: warning: comment on exported const ACMClusterNameLabel should be of the form "ACMClusterNameLabel ..." (golint)
    • Line 78: warning: exported var GitOpsClusterPredicateFunc should have comment or be unexported (golint)
    • Line 87: warning: exported var PlacementDecisionPredicateFunc 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!