Preparing report...

Report for github.com/kubernetes-incubator/cri-o

A+    Excellent!    Found 51 issues across 339 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!


gocyclo96%

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.


golint87%

Golint is a linter for Go source code.

    • cri-o/internal/storage/image.go
    • Line 99: warning: comment on exported type CgroupPullConfiguration should be of the form "CgroupPullConfiguration ..." (with optional leading article) (golint)
    • Line 105: warning: comment on exported type ImageCopyOptions should be of the form "ImageCopyOptions ..." (with optional leading article) (golint)
    • cri-o/internal/oci/oci.go
    • Line 183: warning: comment on exported method Runtime.PrivilegedWithoutHostDevices should be of the form "PrivilegedWithoutHostDevices ..." (golint)
    • Line 440: warning: comment on exported function BuildContainerdBinaryName should be of the form "BuildContainerdBinaryName ..." (golint)
    • cri-o/internal/config/conmonmgr/conmonmgr.go
    • Line 15: warning: exported type ConmonManager should have comment or be unexported (golint)
    • Line 20: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 66: warning: exported method ConmonManager.SupportsSync should have comment or be unexported (golint)
    • cri-o/internal/lib/sandbox/sandbox.go
    • Line 69: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 119: warning: exported method Sandbox.CreatedAt should have comment or be unexported (golint)
    • Line 386: warning: exported method Sandbox.RestoreStopped should have comment or be unexported (golint)
    • cri-o/internal/log/interceptors.go
    • Line 10: warning: exported type ServerStream should have comment or be unexported (golint)
    • Line 15: warning: exported method ServerStream.Context should have comment or be unexported (golint)
    • Line 19: warning: exported function NewServerStream should have comment or be unexported (golint)
    • Line 26: warning: exported function StreamInterceptor should have comment or be unexported (golint)
    • Line 46: warning: exported function UnaryInterceptor should have comment or be unexported (golint)
    • Line 68: warning: exported function AddRequestNameAndID should have comment or be unexported (golint)
    • cri-o/internal/log/log.go
    • Line 11: warning: exported type ID should have comment or be unexported (golint)
    • Line 12: warning: exported type Name should have comment or be unexported (golint)
    • Line 15: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 19: warning: exported function Infof should have comment or be unexported (golint)
    • Line 23: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 27: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 31: warning: exported function Fatalf should have comment or be unexported (golint)
    • cri-o/server/inspect.go
    • Line 117: warning: exported const InspectConfigEndpoint should have comment (or a comment on this block) or be unexported (golint)
    • cri-o/internal/oci/container.go
    • Line 38: warning: exported var ErrContainerStopped should have comment or be unexported (golint)
    • Line 145: warning: exported function NewSpoofedContainer should have comment or be unexported (golint)
    • Line 504: warning: comment on exported function GetPidStartTimeFromFile should be of the form "GetPidStartTimeFromFile ..." (golint)
    • cri-o/internal/config/seccomp/seccomp.go
    • Line 34: warning: comment on exported method Config.SetDefaultWhenEmpty should be of the form "SetDefaultWhenEmpty ..." (golint)
    • Line 40: warning: comment on exported method Config.UseDefaultWhenEmpty should be of the form "UseDefaultWhenEmpty ..." (golint)
    • cri-o/pkg/annotations/annotations.go
    • Line 4: warning: comment on exported const UsernsModeAnnotation should be of the form "UsernsModeAnnotation ..." (golint)
    • Line 32: warning: exported var AllAllowedAnnotations should have comment or be unexported (golint)
    • cri-o/internal/criocli/criocli.go
    • Line 25: warning: exported function GetConfigFromContext should have comment or be unexported (golint)
    • Line 33: warning: exported function GetAndMergeConfigFromContext should have comment or be unexported (golint)
    • Line 328: warning: exported function GetFlagsAndMetadata should have comment or be unexported (golint)
    • cri-o/server/cri/types/types.go
    • Line 6: warning: exported const RuntimeReady should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type VersionRequest should have comment or be unexported (golint)
    • Line 31: warning: exported type VersionResponse should have comment or be unexported (golint)
    • Line 38: warning: exported type RunPodSandboxRequest should have comment or be unexported (golint)
    • Line 43: warning: exported type RunPodSandboxResponse should have comment or be unexported (golint)
    • Line 47: warning: exported type StopPodSandboxRequest should have comment or be unexported (golint)
    • Line 51: warning: exported type RemovePodSandboxRequest should have comment or be unexported (golint)
    • Line 55: warning: exported type PodSandboxStatusRequest should have comment or be unexported (golint)
    • Line 60: warning: exported type PodSandboxStatusResponse should have comment or be unexported (golint)
    • Line 65: warning: exported type ListPodSandboxRequest should have comment or be unexported (golint)
    • Line 69: warning: exported type ListPodSandboxResponse should have comment or be unexported (golint)
    • Line 73: warning: exported type CreateContainerRequest should have comment or be unexported (golint)
    • Line 79: warning: exported type CreateContainerResponse should have comment or be unexported (golint)
    • Line 83: warning: exported type StartContainerRequest should have comment or be unexported (golint)
    • Line 87: warning: exported type StopContainerRequest should have comment or be unexported (golint)
    • Line 92: warning: exported type RemoveContainerRequest should have comment or be unexported (golint)
    • Line 96: warning: exported type ListContainersRequest should have comment or be unexported (golint)
    • Line 100: warning: exported type ListContainersResponse should have comment or be unexported (golint)
    • Line 104: warning: exported type ContainerStatusRequest should have comment or be unexported (golint)
    • Line 109: warning: exported type ContainerStatusResponse should have comment or be unexported (golint)
    • Line 114: warning: exported type UpdateContainerResourcesRequest should have comment or be unexported (golint)
    • Line 119: warning: exported type ExecSyncRequest should have comment or be unexported (golint)
    • Line 125: warning: exported type ExecSyncResponse should have comment or be unexported (golint)
    • Line 131: warning: exported type ExecRequest should have comment or be unexported (golint)
    • Line 140: warning: exported type ExecResponse should have comment or be unexported (golint)
    • Line 144: warning: exported type AttachRequest should have comment or be unexported (golint)
    • Line 152: warning: exported type AttachResponse should have comment or be unexported (golint)
    • Line 156: warning: exported type PortForwardRequest should have comment or be unexported (golint)
    • Line 161: warning: exported type PortForwardResponse should have comment or be unexported (golint)
    • Line 165: warning: exported type ListImagesRequest should have comment or be unexported (golint)
    • Line 169: warning: exported type ListImagesResponse should have comment or be unexported (golint)
    • Line 173: warning: exported type ImageStatusRequest should have comment or be unexported (golint)
    • Line 178: warning: exported type ImageStatusResponse should have comment or be unexported (golint)
    • Line 183: warning: exported type PullImageRequest should have comment or be unexported (golint)
    • Line 189: warning: exported type PullImageResponse should have comment or be unexported (golint)
    • Line 193: warning: exported type RemoveImageRequest should have comment or be unexported (golint)
    • Line 197: warning: exported type StatusRequest should have comment or be unexported (golint)
    • Line 201: warning: exported type StatusResponse should have comment or be unexported (golint)
    • Line 206: warning: exported type ImageFsInfoResponse should have comment or be unexported (golint)
    • Line 210: warning: exported type ContainerStatsRequest should have comment or be unexported (golint)
    • Line 214: warning: exported type ContainerStatsResponse should have comment or be unexported (golint)
    • Line 218: warning: exported type ListContainerStatsRequest should have comment or be unexported (golint)
    • Line 222: warning: exported type ListContainerStatsResponse should have comment or be unexported (golint)
    • Line 226: warning: exported type ReopenContainerLogRequest should have comment or be unexported (golint)
    • Line 230: warning: exported type ImageFilter should have comment or be unexported (golint)
    • Line 234: warning: exported type Image should have comment or be unexported (golint)
    • Line 244: warning: exported type ImageSpec should have comment or be unexported (golint)
    • Line 249: warning: exported type AuthConfig should have comment or be unexported (golint)
    • Line 258: warning: exported type PodSandboxConfig should have comment or be unexported (golint)
    • Line 269: warning: exported function NewPodSandboxConfig should have comment or be unexported (golint)
    • Line 278: warning: exported type PodSandboxMetadata should have comment or be unexported (golint)
    • Line 285: warning: exported type DNSConfig should have comment or be unexported (golint)
    • Line 291: warning: exported type PortMapping should have comment or be unexported (golint)
    • Line 298: warning: exported type Protocol should have comment or be unexported (golint)
    • Line 300: warning: exported var ProtocolName should have comment or be unexported (golint)
    • Line 310: warning: exported type LinuxPodSandboxConfig should have comment or be unexported (golint)
    • Line 316: warning: exported function NewLinuxPodSandboxConfig should have comment or be unexported (golint)
    • Line 322: warning: exported type LinuxSandboxSecurityContext should have comment or be unexported (golint)
    • Line 335: warning: exported function NewLinuxSandboxSecurityContext should have comment or be unexported (golint)
    • Line 344: warning: exported type NamespaceOption should have comment or be unexported (golint)
    • Line 351: warning: exported type NamespaceMode should have comment or be unexported (golint)
    • Line 353: warning: exported type SELinuxOption should have comment or be unexported (golint)
    • Line 360: warning: exported type Int64Value should have comment or be unexported (golint)
    • Line 364: warning: exported type FilesystemUsage should have comment or be unexported (golint)
    • Line 371: warning: exported type FilesystemIdentifier should have comment or be unexported (golint)
    • Line 375: warning: exported type UInt64Value should have comment or be unexported (golint)
    • Line 379: warning: exported type PodSandboxStatus should have comment or be unexported (golint)
    • Line 391: warning: exported type PodSandboxState should have comment or be unexported (golint)
    • Line 393: warning: exported type PodSandboxNetworkStatus should have comment or be unexported (golint)
    • Line 398: warning: exported type PodIP should have comment or be unexported (golint)
    • Line 402: warning: exported type LinuxPodSandboxStatus should have comment or be unexported (golint)
    • Line 406: warning: exported type Namespace should have comment or be unexported (golint)
    • Line 410: warning: exported type PodSandboxFilter should have comment or be unexported (golint)
    • Line 416: warning: exported type PodSandboxStateValue should have comment or be unexported (golint)
    • Line 420: warning: exported type PodSandbox should have comment or be unexported (golint)
    • Line 430: warning: exported type ContainerConfig should have comment or be unexported (golint)
    • Line 448: warning: exported function NewContainerConfig should have comment or be unexported (golint)
    • Line 456: warning: exported type ContainerMetadata should have comment or be unexported (golint)
    • Line 461: warning: exported type KeyValue should have comment or be unexported (golint)
    • Line 466: warning: exported type Mount should have comment or be unexported (golint)
    • Line 474: warning: exported type MountPropagation should have comment or be unexported (golint)
    • Line 476: warning: exported type Device should have comment or be unexported (golint)
    • Line 482: warning: exported type LinuxContainerConfig should have comment or be unexported (golint)
    • Line 487: warning: exported function NewLinuxContainerConfig should have comment or be unexported (golint)
    • Line 494: warning: exported type LinuxContainerResources should have comment or be unexported (golint)
    • Line 505: warning: exported type HugepageLimit should have comment or be unexported (golint)
    • Line 510: warning: exported type LinuxContainerSecurityContext should have comment or be unexported (golint)
    • Line 529: warning: exported function NewLinuxContainerSecurityContext should have comment or be unexported (golint)
    • Line 539: warning: exported type Capability should have comment or be unexported (golint)
    • Line 544: warning: exported type ContainerFilter should have comment or be unexported (golint)
    • Line 551: warning: exported type ContainerStateValue should have comment or be unexported (golint)
    • Line 555: warning: exported type ContainerState should have comment or be unexported (golint)
    • Line 557: warning: exported type Container should have comment or be unexported (golint)
    • Line 569: warning: exported type ContainerStatus should have comment or be unexported (golint)
    • Line 587: warning: exported type RuntimeStatus should have comment or be unexported (golint)
    • Line 591: warning: exported type RuntimeCondition should have comment or be unexported (golint)
    • Line 598: warning: exported type ContainerStats should have comment or be unexported (golint)
    • Line 605: warning: exported type ContainerAttributes should have comment or be unexported (golint)
    • Line 612: warning: exported type CPUUsage should have comment or be unexported (golint)
    • Line 617: warning: exported type MemoryUsage should have comment or be unexported (golint)
    • Line 622: warning: exported type ContainerStatsFilter should have comment or be unexported (golint)
    • Line 628: warning: exported type SecurityProfile should have comment or be unexported (golint)
    • Line 633: warning: exported type SecurityProfileType should have comment or be unexported (golint)
    • Line 636: warning: exported const SecurityProfileTypeRuntimeDefault should have comment (or a comment on this block) or be unexported (golint)
    • cri-o/internal/config/ulimits/ulimits.go
    • Line 10: warning: exported type Ulimit should have comment or be unexported (golint)
    • Line 16: warning: exported type Config should have comment or be unexported (golint)
    • Line 20: warning: exported function New should have comment or be unexported (golint)
    • Line 26: warning: exported method Config.LoadUlimits should have comment or be unexported (golint)
    • Line 49: warning: exported method Config.Ulimits should have comment or be unexported (golint)
    • cri-o/utils/cmdrunner/cmdrunner.go
    • Line 7: warning: exported type CommandRunner should have comment or be unexported (golint)
    • Line 11: warning: exported type RealCommandRunner should have comment or be unexported (golint)
    • Line 13: warning: exported method RealCommandRunner.CombinedOutput should have comment or be unexported (golint)
    • cri-o/pkg/config/workloads.go
    • Line 11: warning: exported type Resources should have comment or be unexported (golint)
    • Line 16: warning: exported type Workloads should have comment or be unexported (golint)
    • Line 18: warning: exported type WorkloadConfig should have comment or be unexported (golint)
    • Line 35: warning: exported method Workloads.Validate should have comment or be unexported (golint)
    • Line 44: warning: exported method WorkloadConfig.Validate should have comment or be unexported (golint)
    • Line 51: warning: exported method Workloads.MutateSpecGivenAnnotations should have comment or be unexported (golint)
    • Line 98: warning: exported method Resources.ValidateDefaults should have comment or be unexported (golint)
    • Line 106: warning: exported method Resources.MutateSpec should have comment or be unexported (golint)
    • cri-o/internal/config/nsmgr/types.go
    • Line 19: warning: exported const NETNS should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported type PodNamespacesConfig should have comment or be unexported (golint)
    • Line 40: warning: exported type PodNamespaceConfig should have comment or be unexported (golint)
    • cri-o/pkg/config/config.go
    • Line 183: warning: comment on exported type Runtimes should be of the form "Runtimes ..." (with optional leading article) (golint)
    • Line 798: warning: exported method RootConfig.CleanShutdownSupportedFileName should have comment or be unexported (golint)
    • Line 980: warning: exported method RuntimeConfig.ConmonSupportsSync should have comment or be unexported (golint)
    • Line 984: warning: exported method RuntimeConfig.ValidatePinnsPath should have comment or be unexported (golint)
    • Line 1016: warning: exported method RuntimeConfig.Devices should have comment or be unexported (golint)
    • Line 1097: warning: exported method RuntimeHandler.ValidateRuntimeVMBinaryPattern should have comment or be unexported (golint)
    • Line 1149: warning: exported method RuntimeHandler.ValidateRuntimeAllowedAnnotations should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!