Preparing report...

Report for github.com/kubeflow/pytorch-operator

A    Great!    Found 28 issues across 61 files

Tweet

gofmt81%

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!


gocyclo88%

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.


golint62%

Golint is a linter for Go source code.

    • pytorch-operator/pkg/common/util/v1/testutil/job.go
    • Line 28: warning: exported function NewPyTorchJobWithCleanPolicy should have comment or be unexported (golint)
    • Line 39: warning: exported function NewPyTorchJobWithCleanupJobDelay should have comment or be unexported (golint)
    • Line 54: warning: exported function NewPyTorchJobWithActiveDeadlineSeconds should have comment or be unexported (golint)
    • Line 69: warning: exported function NewPyTorchJobWithBackoffLimit should have comment or be unexported (golint)
    • Line 86: warning: exported function NewPyTorchJobWithMaster should have comment or be unexported (golint)
    • Line 95: warning: exported function NewPyTorchJob should have comment or be unexported (golint)
    • Line 122: warning: exported function NewPyTorchReplicaSpecTemplate should have comment or be unexported (golint)
    • Line 142: warning: exported function SetPyTorchJobCompletionTime should have comment or be unexported (golint)
    • pytorch-operator/version/version.go
    • Line 22: warning: exported var Version should have comment or be unexported (golint)
    • Line 26: warning: exported function PrintVersionAndExit should have comment or be unexported (golint)
    • Line 33: warning: exported function Info should have comment or be unexported (golint)
    • pytorch-operator/pkg/controller.v1/pytorch/controller.go
    • Line 15: warning: package comment should be of the form "Package pytorch ..." (golint)
    • Line 570: warning: exported method PyTorchController.GetJobFromInformerCache should have comment or be unexported (golint)
    • Line 574: warning: exported method PyTorchController.GetJobFromAPIClient should have comment or be unexported (golint)
    • Line 578: warning: exported method PyTorchController.GetAPIGroupVersionKind should have comment or be unexported (golint)
    • Line 582: warning: exported method PyTorchController.GetAPIGroupVersion should have comment or be unexported (golint)
    • Line 586: warning: exported method PyTorchController.GetGroupNameLabelKey should have comment or be unexported (golint)
    • Line 590: warning: comment on exported method PyTorchController.GetJobNameLabelKey should be of the form "GetJobNameLabelKey ..." (golint)
    • Line 595: warning: exported method PyTorchController.GetGroupNameLabelValue should have comment or be unexported (golint)
    • Line 599: warning: exported method PyTorchController.GetReplicaTypeLabelKey should have comment or be unexported (golint)
    • Line 603: warning: exported method PyTorchController.GetReplicaIndexLabelKey should have comment or be unexported (golint)
    • Line 607: warning: exported method PyTorchController.ControllerName should have comment or be unexported (golint)
    • pytorch-operator/pkg/common/util/v1/testutil/pod.go
    • Line 38: warning: exported function NewBasePod should have comment or be unexported (golint)
    • Line 49: warning: exported function NewPod should have comment or be unexported (golint)
    • Line 56: warning: comment on exported function NewPodList should be of the form "NewPodList ..." (golint)
    • Line 67: warning: exported function SetPodsStatuses should have comment or be unexported (golint)
    • pytorch-operator/pkg/controller.v1/pytorch/util.go
    • Line 49: warning: exported type InitContainerParam should have comment or be unexported (golint)
    • Line 54: warning: exported function ContainMasterSpec should have comment or be unexported (golint)
    • Line 61: warning: exported function GetInitContainer should have comment or be unexported (golint)
    • Line 80: warning: exported function AddInitContainerForWorkerPod should have comment or be unexported (golint)
    • pytorch-operator/pkg/common/util/v1/unstructured/informer.go
    • Line 21: warning: exported type UnstructuredInformer should have comment or be unexported (golint)
    • Line 25: warning: exported function NewPyTorchJobInformer should have comment or be unexported (golint)
    • Line 31: warning: exported method UnstructuredInformer.Informer should have comment or be unexported (golint)
    • Line 35: warning: exported method UnstructuredInformer.Lister should have comment or be unexported (golint)
    • pytorch-operator/pkg/common/util/v1/testutil/util.go
    • Line 32: warning: exported const LabelGroupName should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: comment on exported const DeprecatedLabelPyTorchJobName should be of the form "DeprecatedLabelPyTorchJobName ..." (golint)
    • Line 44: warning: exported var GroupName should have comment or be unexported (golint)
    • Line 48: warning: exported function GenLabels should have comment or be unexported (golint)
    • Line 57: warning: exported function GenOwnerReference should have comment or be unexported (golint)
    • Line 82: warning: exported function GetKey should have comment or be unexported (golint)
    • Line 91: warning: exported function CheckCondition should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!