Preparing report...

Report for github.com/oracle/oci-cloud-controller-manager

A+    Excellent!    Found 35 issues across 112 files

Tweet

gofmt94%

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!


gocyclo91%

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.


golint83%

Golint is a linter for Go source code.

    • oci-cloud-controller-manager/test/e2e/framework/kubeclient.go
    • Line 26: warning: should not use dot imports (golint)
    • Line 27: warning: should not use dot imports (golint)
    • Line 58: warning: comment on exported const SingleCallTimeout should be of the form "SingleCallTimeout ..." (golint)
    • Line 69: warning: comment on exported var SSLCAData should be of the form "SSLCAData ..." (golint)
    • Line 88: warning: exported var SSLCertificateData should have comment or be unexported (golint)
    • Line 142: warning: exported type KubeClient should have comment or be unexported (golint)
    • Line 147: warning: exported method KubeClient.NamespaceExists should have comment or be unexported (golint)
    • Line 158: warning: exported method KubeClient.DeletePod should have comment or be unexported (golint)
    • Line 181: warning: exported method KubeClient.GetPodIP should have comment or be unexported (golint)
    • Line 187: warning: exported method KubeClient.CreatePod should have comment or be unexported (golint)
    • Line 191: warning: exported method KubeClient.WaitForPodRunning should have comment or be unexported (golint)
    • Line 209: warning: exported method KubeClient.WaitForPodSuccess should have comment or be unexported (golint)
    • Line 227: warning: exported method KubeClient.WaitForPodFailure should have comment or be unexported (golint)
    • Line 248: warning: exported method KubeClient.PodLogs should have comment or be unexported (golint)
    • Line 294: warning: comment on exported method KubeClient.AddLabelsToNode should be of the form "AddLabelsToNode ..." (golint)
    • Line 380: warning: comment on exported function FilterNodes should be of the form "FilterNodes ..." (golint)
    • Line 434: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 462: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 508: warning: exported function IsRetryableAPIError should have comment or be unexported (golint)
    • Line 594: warning: exported function NewKubectlCommand should have comment or be unexported (golint)
    • oci-cloud-controller-manager/pkg/util/mount/mount_linux.go
    • Line 188: warning: exported function IsNotMountPoint should have comment or be unexported (golint)
    • Line 264: warning: comment on exported method Mounter.GetDeviceNameFromMount should be of the form "GetDeviceNameFromMount ..." (golint)
    • Line 403: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 408: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • oci-cloud-controller-manager/test/e2e/framework/framework.go
    • Line 29: warning: comment on exported const K8sResourcePoll should be of the form "K8sResourcePoll ..." (golint)
    • Line 37: warning: exported const DefaultClusterKubeconfig should have comment (or a comment on this block) or be unexported (golint)
    • Line 138: warning: comment on exported method Framework.Initialize should be of the form "Initialize ..." (golint)
    • oci-cloud-controller-manager/test/e2e/framework/networking_util.go
    • Line 27: warning: should not use dot imports (golint)
    • Line 36: warning: exported const EndpointHttpPort should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: comment on exported const SessionAffinityChecks should be of the form "SessionAffinityChecks ..." (golint)
    • Line 86: warning: exported function TestReachableHTTP should have comment or be unexported (golint)
    • Line 90: warning: exported function TestReachableHTTPWithRetriableErrorCodes should have comment or be unexported (golint)
    • Line 94: warning: exported function TestReachableHTTPWithContent should have comment or be unexported (golint)
    • Line 98: warning: exported function TestReachableHTTPWithContentTimeout should have comment or be unexported (golint)
    • Line 102: warning: exported function TestReachableHTTPWithContentTimeoutWithRetriableErrorCodes should have comment or be unexported (golint)
    • Line 150: warning: exported function TestNotReachableHTTP should have comment or be unexported (golint)
    • Line 154: warning: exported function TestNotReachableHTTPTimeout should have comment or be unexported (golint)
    • Line 177: warning: exported function TestReachableUDP should have comment or be unexported (golint)
    • Line 222: warning: exported function TestNotReachableUDP should have comment or be unexported (golint)
    • Line 265: warning: exported function TestHitNodesFromOutside should have comment or be unexported (golint)
    • Line 269: warning: exported function TestHitNodesFromOutsideWithCount should have comment or be unexported (golint)
    • oci-cloud-controller-manager/test/e2e/framework/service_util.go
    • Line 27: warning: should not use dot imports (golint)
    • Line 28: warning: should not use dot imports (golint)
    • Line 68: warning: comment on exported const LoadBalancerCreateTimeoutDefault should be of the form "LoadBalancerCreateTimeoutDefault ..." (golint)
    • Line 71: warning: exported const LoadBalancerCreateTimeoutLarge should have comment (or a comment on this block) or be unexported (golint)
    • Line 73: warning: comment on exported const LoadBalancerCleanupTimeout should be of the form "LoadBalancerCleanupTimeout ..." (golint)
    • Line 77: warning: comment on exported const LoadBalancerPollTimeout should be of the form "LoadBalancerPollTimeout ..." (golint)
    • Line 83: warning: comment on exported const MaxNodesForEndpointsTests should be of the form "MaxNodesForEndpointsTests ..." (golint)
    • Line 95: warning: comment on exported const OCILBShapeUpdateTimeout should be of the form "OCILBShapeUpdateTimeout ..." (golint)
    • Line 99: warning: comment on exported var ServiceNodePortRange should be of the form "ServiceNodePortRange ..." (golint)
    • Line 102: warning: comment on exported type ServiceTestJig should be of the form "ServiceTestJig ..." (with optional leading article) (golint)
    • Line 214: warning: exported method ServiceTestJig.ChangeServiceType should have comment or be unexported (golint)
    • Line 296: warning: exported function GetNodeAddresses should have comment or be unexported (golint)
    • Line 306: warning: exported function CollectAddresses should have comment or be unexported (golint)
    • Line 314: warning: exported function GetNodePublicIps should have comment or be unexported (golint)
    • Line 325: warning: exported function PickNodeIP should have comment or be unexported (golint)
    • Line 374: warning: exported method ServiceTestJig.WaitForEndpointOnNode should have comment or be unexported (golint)
    • Line 401: warning: exported method ServiceTestJig.SanityCheckService should have comment or be unexported (golint)
    • Line 483: warning: exported method ServiceTestJig.WaitForNewIngressIPOrFail should have comment or be unexported (golint)
    • Line 498: warning: exported method ServiceTestJig.ChangeServiceNodePortOrFail should have comment or be unexported (golint)
    • Line 521: warning: exported method ServiceTestJig.WaitForLoadBalancerOrFail should have comment or be unexported (golint)
    • Line 539: warning: exported method ServiceTestJig.WaitForLoadBalancerDestroyOrFail should have comment or be unexported (golint)
    • Line 620: warning: exported method ServiceTestJig.AddRCAntiAffinity should have comment or be unexported (golint)
    • Line 639: warning: exported method ServiceTestJig.CreatePDBOrFail should have comment or be unexported (golint)
    • Line 746: warning: exported method ServiceTestJig.TestReachableHTTP should have comment or be unexported (golint)
    • Line 750: warning: exported method ServiceTestJig.TestReachableHTTPWithRetriableErrorCodes should have comment or be unexported (golint)
    • Line 762: warning: exported method ServiceTestJig.TestNotReachableHTTP should have comment or be unexported (golint)
    • Line 768: warning: exported method ServiceTestJig.TestReachableUDP should have comment or be unexported (golint)
    • Line 774: warning: exported method ServiceTestJig.TestNotReachableUDP should have comment or be unexported (golint)
    • Line 780: warning: exported method ServiceTestJig.GetHTTPContent should have comment or be unexported (golint)
    • Line 826: warning: exported method ServiceTestJig.TestHTTPHealthCheckNodePort should have comment or be unexported (golint)
    • Line 846: warning: exported method CloudProviderFramework.VerifyHealthCheckConfig should have comment or be unexported (golint)
    • Line 910: warning: exported method CloudProviderFramework.VerifyLoadBalancerConnectionIdleTimeout should have comment or be unexported (golint)
    • Line 941: warning: comment on exported type ServiceTestFixture should be of the form "ServiceTestFixture ..." (with optional leading article) (golint)
    • Line 956: warning: exported function NewServerTest should have comment or be unexported (golint)
    • Line 975: warning: comment on exported method ServiceTestFixture.BuildServiceSpec should be of the form "BuildServiceSpec ..." (golint)
    • Line 1002: warning: comment on exported method ServiceTestFixture.CreateService should be of the form "CreateService ..." (golint)
    • Line 1011: warning: comment on exported method ServiceTestFixture.DeleteService should be of the form "DeleteService ..." (golint)
    • Line 1020: warning: exported method ServiceTestFixture.Cleanup should have comment or be unexported (golint)
    • Line 1068: warning: exported function GetIngressPoint should have comment or be unexported (golint)
    • Line 1099: warning: exported function GetContainerPortsByPodUID should have comment or be unexported (golint)
    • Line 1115: warning: exported type PortsByPodName should have comment or be unexported (golint)
    • Line 1116: warning: exported type PortsByPodUID should have comment or be unexported (golint)
    • Line 1154: warning: exported function CreateServiceSpec should have comment or be unexported (golint)
    • oci-cloud-controller-manager/pkg/util/mount/mount.go
    • Line 17: warning: package comment should be of the form "Package mount ..." (golint)
    • Line 35: warning: exported const MountsInGlobalPDPath should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported type Interface should have comment or be unexported (golint)
    • Line 99: warning: exported method SafeFormatAndMount.Mount should have comment or be unexported (golint)
    • Line 119: warning: exported function NewMount should have comment or be unexported (golint)
    • oci-cloud-controller-manager/test/e2e/framework/pvc_util.go
    • Line 27: warning: should not use dot imports (golint)
    • Line 28: warning: should not use dot imports (golint)
    • Line 42: warning: exported const KmsKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 195: warning: comment on exported method PVCTestJig.CreatePVorFailCSI should be of the form "CreatePVorFailCSI ..." (golint)
    • Line 208: warning: comment on exported method PVCTestJig.CreatePVCorFailCSI should be of the form "CreatePVCorFailCSI ..." (golint)
    • Line 227: warning: comment on exported method PVCTestJig.CreateAndAwaitPVCOrFailCSI should be of the form "CreateAndAwaitPVCOrFailCSI ..." (golint)
    • Line 295: warning: comment on exported method PVCTestJig.NewPODForCSI should be of the form "NewPODForCSI ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell91%

Misspell Finds commonly misspelled English words