Preparing report...

Report for github.com/kubernetes-incubator/apiserver-builder

A    Great!    Found 74 issues across 126 files

Tweet

gofmt84%

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!


gocyclo98%

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.


golint51%

Golint is a linter for Go source code.

    • apiserver-builder/example/podlogs/pkg/apis/podlogs/logs_pod_rest.go
    • Line 48: warning: exported function NewPodLogsREST should have comment or be unexported (golint)
    • Line 85: warning: comment on exported type PodLogsREST should be of the form "PodLogsREST ..." (with optional leading article) (golint)
    • Line 91: warning: exported method PodLogsREST.NewGetOptions should have comment or be unexported (golint)
    • Line 96: warning: comment on exported method PodLogsREST.Get should be of the form "Get ..." (golint)
    • Line 126: warning: exported method PodLogsREST.New should have comment or be unexported (golint)
    • Line 131: warning: exported type PodGetter should have comment or be unexported (golint)
    • Line 135: warning: context.Context should be the first parameter of a function (golint)
    • apiserver-builder/example/basic/pkg/apis/olympus/v1beta1/poseidon_types.go
    • Line 33: warning: comment on exported type Poseidon should be of the form "Poseidon ..." (with optional leading article) (golint)
    • Line 58: warning: exported method Poseidon.GetObjectMeta should have comment or be unexported (golint)
    • Line 62: warning: exported method Poseidon.NamespaceScoped should have comment or be unexported (golint)
    • Line 66: warning: exported method Poseidon.New should have comment or be unexported (golint)
    • Line 70: warning: exported method Poseidon.NewList should have comment or be unexported (golint)
    • Line 74: warning: exported method Poseidon.GetGroupVersionResource should have comment or be unexported (golint)
    • Line 82: warning: exported method Poseidon.IsStorageVersion should have comment or be unexported (golint)
    • Line 86: warning: comment on exported type PoseidonList should be of the form "PoseidonList ..." (with optional leading article) (golint)
    • Line 93: warning: exported method PoseidonList.GetListMeta should have comment or be unexported (golint)
    • Line 97: warning: exported method Poseidon.IndexingFields should have comment or be unexported (golint)
    • Line 105: warning: exported method Poseidon.GetField should have comment or be unexported (golint)
    • Line 119: warning: exported method PoseidonStatus.SubResourceName should have comment or be unexported (golint)
    • Line 123: warning: exported method Poseidon.GetStatus should have comment or be unexported (golint)
    • Line 129: warning: exported method PoseidonStatus.CopyTo should have comment or be unexported (golint)
    • apiserver-builder/example/kine/pkg/apis/mysql/v1/tiger_types.go
    • Line 29: warning: comment on exported type Tiger should be of the form "Tiger ..." (with optional leading article) (golint)
    • Line 48: warning: comment on exported type TigerList should be of the form "TigerList ..." (with optional leading article) (golint)
    • Line 56: warning: exported method TigerList.GetListMeta should have comment or be unexported (golint)
    • Line 64: warning: exported method Tiger.GetObjectMeta should have comment or be unexported (golint)
    • Line 68: warning: exported method Tiger.NamespaceScoped should have comment or be unexported (golint)
    • Line 72: warning: exported method Tiger.New should have comment or be unexported (golint)
    • Line 76: warning: exported method Tiger.NewList should have comment or be unexported (golint)
    • Line 80: warning: exported method Tiger.GetGroupVersionResource should have comment or be unexported (golint)
    • Line 88: warning: exported method Tiger.IsStorageVersion should have comment or be unexported (golint)
    • Line 95: warning: exported method TigerStatus.SubResourceName should have comment or be unexported (golint)
    • Line 99: warning: exported method Tiger.GetStatus should have comment or be unexported (golint)
    • Line 103: warning: exported method TigerStatus.CopyTo should have comment or be unexported (golint)
    • apiserver-builder/example/podlogs/pkg/apis/podlogs/v1/zz_generated.api.register.go
    • Line 40: warning: exported var ApiVersion should have comment or be unexported (golint)
    • Line 54: warning: comment on exported var AddToScheme should be of the form "AddToScheme ..." (golint)
    • Line 71: warning: comment on exported function Kind should be of the form "Kind ..." (golint)
    • Line 77: warning: comment on exported function Resource should be of the form "Resource ..." (golint)
    • Line 85: warning: exported type PodList should have comment or be unexported (golint)
    • Line 93: warning: exported type PodLogsList should have comment or be unexported (golint)
    • apiserver-builder/example/basic/pkg/apis/miskatonic/v1beta1/university_campus.go
    • Line 34: warning: exported method University.GetArbitrarySubResources should have comment or be unexported (golint)
    • Line 40: warning: comment on exported type UniversityCampus should be of the form "UniversityCampus ..." (with optional leading article) (golint)
    • Line 46: warning: exported method UniversityCampus.Get should have comment or be unexported (golint)
    • Line 60: warning: exported method UniversityCampus.Update should have comment or be unexported (golint)
    • Line 68: warning: exported method UniversityCampus.New should have comment or be unexported (golint)
    • Line 72: warning: exported method UniversityCampus.SubResourceName should have comment or be unexported (golint)
    • apiserver-builder/cmd/apiserver-boot/boot/version/version.go
    • Line 36: warning: exported type Version should have comment or be unexported (golint)
    • Line 45: warning: exported function GetVersion should have comment or be unexported (golint)
    • Line 56: warning: exported method Version.Print should have comment or be unexported (golint)
    • Line 68: warning: exported function AddVersion should have comment or be unexported (golint)
    • Line 72: warning: exported function RunVersion should have comment or be unexported (golint)
    • apiserver-builder/example/podlogs/pkg/apis/podlogs/zz_generated.api.register.go
    • Line 34: warning: exported var PodlogsPodStorage should have comment or be unexported (golint)
    • Line 56: warning: comment on exported var ApiVersion should be of the form "ApiVersion ..." (golint)
    • Line 63: warning: comment on exported var AddToScheme should be of the form "AddToScheme ..." (golint)
    • Line 73: warning: comment on exported function Kind should be of the form "Kind ..." (golint)
    • Line 79: warning: comment on exported function Resource should be of the form "Resource ..." (golint)
    • Line 89: warning: exported type Pod should have comment or be unexported (golint)
    • Line 98: warning: exported type PodLogs should have comment or be unexported (golint)
    • Line 110: warning: exported type PodStatus should have comment or be unexported (golint)
    • Line 113: warning: exported type PodSpec should have comment or be unexported (golint)
    • Line 116: warning: comment on exported type PodStrategy should be of the form "PodStrategy ..." (with optional leading article) (golint)
    • Line 124: warning: comment on exported type PodStatusStrategy should be of the form "PodStatusStrategy ..." (with optional leading article) (golint)
    • Line 131: warning: exported type PodList should have comment or be unexported (golint)
    • Line 139: warning: exported type PodLogsList should have comment or be unexported (golint)
    • Line 145: warning: exported method Pod.NewStatus should have comment or be unexported (golint)
    • Line 149: warning: exported method Pod.GetStatus should have comment or be unexported (golint)
    • Line 153: warning: exported method Pod.SetStatus should have comment or be unexported (golint)
    • Line 157: warning: exported method Pod.GetSpec should have comment or be unexported (golint)
    • Line 161: warning: exported method Pod.SetSpec should have comment or be unexported (golint)
    • Line 165: warning: exported method Pod.GetObjectMeta should have comment or be unexported (golint)
    • Line 169: warning: exported method Pod.SetGeneration should have comment or be unexported (golint)
    • Line 173: warning: exported method Pod.GetGeneration should have comment or be unexported (golint)
    • Line 177: warning: comment on exported type PodRegistry should be of the form "PodRegistry ..." (with optional leading article) (golint)
    • Line 187: warning: comment on exported function NewPodRegistry should be of the form "NewPodRegistry ..." (golint)
    • apiserver-builder/cmd/apiserver-boot/boot/build/build_executables.go
    • Line 33: warning: exported var Bazel should have comment or be unexported (golint)
    • Line 34: warning: exported var Gazelle should have comment or be unexported (golint)
    • Line 35: warning: exported var BuildTargets should have comment or be unexported (golint)
    • Line 63: warning: exported function AddBuildExecutables should have comment or be unexported (golint)
    • Line 75: warning: exported function RunBuildExecutables should have comment or be unexported (golint)
    • Line 86: warning: exported function BazelBuild should have comment or be unexported (golint)
    • Line 169: warning: exported function GoBuild should have comment or be unexported (golint)
    • apiserver-builder/cmd/apiserver-boot/boot/util/util.go
    • Line 35: warning: exported var Domain should have comment or be unexported (golint)
    • Line 37: warning: comment on exported function WriteIfNotFound should be of the form "WriteIfNotFound ..." (golint)
    • Line 101: warning: exported function GetCopyright should have comment or be unexported (golint)
    • Line 116: warning: exported function GetDomain should have comment or be unexported (golint)
    • Line 139: warning: exported function DoCmd should have comment or be unexported (golint)
    • Line 150: warning: exported function CheckInstall should have comment or be unexported (golint)
    • Line 176: warning: exported function CancelWhenSignaled should have comment or be unexported (golint)
    • apiserver-builder/cmd/apiserver-boot/boot/util/repo.go
    • Line 17: warning: exported function LoadRepoFromGoPath should have comment or be unexported (golint)
    • Line 36: warning: exported function LoadRepoFromGoMod should have comment or be unexported (golint)
    • Line 49: warning: exported function LoadRepoFromGoPathOrGoMod should have comment or be unexported (golint)
    • Line 57: warning: exported function GetRepo should have comment or be unexported (golint)
    • Line 67: warning: exported function SetRepo should have comment or be unexported (golint)
    • apiserver-builder/example/basic/pkg/apis/miskatonic/v1beta1/student_types.go
    • Line 33: warning: comment on exported type Student should be of the form "Student ..." (with optional leading article) (golint)
    • Line 55: warning: comment on exported type StudentList should be of the form "StudentList ..." (with optional leading article) (golint)
    • Line 67: warning: exported method Student.GetObjectMeta should have comment or be unexported (golint)
    • Line 71: warning: exported method Student.NamespaceScoped should have comment or be unexported (golint)
    • Line 75: warning: exported method Student.New should have comment or be unexported (golint)
    • Line 79: warning: exported method Student.NewList should have comment or be unexported (golint)
    • Line 83: warning: exported method Student.GetGroupVersionResource should have comment or be unexported (golint)
    • Line 91: warning: exported method Student.IsStorageVersion should have comment or be unexported (golint)
    • Line 95: warning: exported method Student.ShortNames should have comment or be unexported (golint)
    • Line 99: warning: exported method Student.Categories should have comment or be unexported (golint)
    • Line 103: warning: exported method StudentList.GetListMeta should have comment or be unexported (golint)
    • Line 109: warning: exported method Student.GetStatus should have comment or be unexported (golint)
    • Line 113: warning: exported method StudentStatus.SubResourceName should have comment or be unexported (golint)
    • Line 119: warning: exported method StudentStatus.CopyTo should have comment or be unexported (golint)
    • apiserver-builder/example/basic/pkg/apis/miskatonic/v1beta1/university_types.go
    • Line 39: warning: comment on exported type University should be of the form "University ..." (with optional leading article) (golint)
    • Line 81: warning: exported method University.GetObjectMeta should have comment or be unexported (golint)
    • Line 85: warning: exported method University.NamespaceScoped should have comment or be unexported (golint)
    • Line 89: warning: exported method University.New should have comment or be unexported (golint)
    • Line 93: warning: exported method University.NewList should have comment or be unexported (golint)
    • Line 97: warning: exported method University.GetGroupVersionResource should have comment or be unexported (golint)
    • Line 105: warning: exported method University.IsStorageVersion should have comment or be unexported (golint)
    • Line 109: warning: exported method University.Default should have comment or be unexported (golint)
    • Line 117: warning: exported method University.Validate should have comment or be unexported (golint)
    • Line 129: warning: comment on exported type UniversityList should be of the form "UniversityList ..." (with optional leading article) (golint)
    • Line 136: warning: exported method UniversityList.GetListMeta should have comment or be unexported (golint)
    • Line 142: warning: exported method UniversityStatus.SubResourceName should have comment or be unexported (golint)
    • Line 146: warning: exported method University.GetStatus should have comment or be unexported (golint)
    • Line 152: warning: exported method UniversityStatus.CopyTo should have comment or be unexported (golint)
    • apiserver-builder/example/podexec/pkg/apis/podexec/v1/pod_types.go
    • Line 29: warning: comment on exported type Pod should be of the form "Pod ..." (with optional leading article) (golint)
    • Line 41: warning: exported method Pod.GetObjectMeta should have comment or be unexported (golint)
    • Line 45: warning: exported method Pod.NamespaceScoped should have comment or be unexported (golint)
    • Line 49: warning: exported method Pod.New should have comment or be unexported (golint)
    • Line 53: warning: exported method Pod.NewList should have comment or be unexported (golint)
    • Line 57: warning: exported method Pod.GetGroupVersionResource should have comment or be unexported (golint)
    • Line 65: warning: exported method Pod.IsStorageVersion should have comment or be unexported (golint)
    • Line 77: warning: comment on exported type PodList should be of the form "PodList ..." (with optional leading article) (golint)
    • Line 87: warning: exported method Pod.GetArbitrarySubResources should have comment or be unexported (golint)
    • apiserver-builder/example/basic/pkg/apis/kingsport/v1/festival_types.go
    • Line 35: warning: comment on exported type Festival should be of the form "Festival ..." (with optional leading article) (golint)
    • Line 64: warning: exported method Festival.GetObjectMeta should have comment or be unexported (golint)
    • Line 68: warning: exported method Festival.NamespaceScoped should have comment or be unexported (golint)
    • Line 72: warning: exported method Festival.New should have comment or be unexported (golint)
    • Line 76: warning: exported method Festival.NewList should have comment or be unexported (golint)
    • Line 80: warning: exported method Festival.GetGroupVersionResource should have comment or be unexported (golint)
    • Line 88: warning: exported method Festival.IsStorageVersion should have comment or be unexported (golint)
    • Line 92: warning: exported method Festival.Validate should have comment or be unexported (golint)
    • Line 105: warning: comment on exported type FestivalList should be of the form "FestivalList ..." (with optional leading article) (golint)
    • Line 113: warning: exported method FestivalList.GetListMeta should have comment or be unexported (golint)
    • Line 120: warning: exported method FestivalStatus.SubResourceName should have comment or be unexported (golint)
    • Line 124: warning: exported method Festival.GetStatus should have comment or be unexported (golint)
    • Line 128: warning: exported method FestivalStatus.CopyTo should have comment or be unexported (golint)
    • apiserver-builder/cmd/apiserver-boot/boot/build/build_resource_config.go
    • Line 37: warning: exported var Namespace should have its own declaration (golint)
    • Line 38: warning: exported var Versions should have comment or be unexported (golint)
    • Line 39: warning: exported var ResourceConfigDir should have comment or be unexported (golint)
    • Line 40: warning: exported var ControllerArgs should have comment or be unexported (golint)
    • Line 41: warning: exported var ApiserverArgs should have comment or be unexported (golint)
    • Line 42: warning: exported var ControllerSecret should have comment or be unexported (golint)
    • Line 43: warning: exported var ControllerSecretMount should have comment or be unexported (golint)
    • Line 44: warning: exported var ControllerSecretEnv should have comment or be unexported (golint)
    • Line 45: warning: exported var ImagePullSecrets should have comment or be unexported (golint)
    • Line 46: warning: exported var ServiceAccount should have comment or be unexported (golint)
    • Line 47: warning: exported var StorageClass should have comment or be unexported (golint)
    • Line 67: warning: exported function AddBuildResourceConfig should have comment or be unexported (golint)
    • Line 72: warning: exported function AddBuildResourceConfigFlags should have comment or be unexported (golint)
    • Line 87: warning: exported function RunBuildResourceConfig should have comment or be unexported (golint)
    • apiserver-builder/cmd/apiserver-boot/boot/run/local.go
    • Line 75: warning: exported function AddLocal should have comment or be unexported (golint)
    • Line 98: warning: exported function RunLocal should have comment or be unexported (golint)
    • Line 154: warning: exported function RunEtcd should have comment or be unexported (golint)
    • Line 166: warning: exported function RunApiserver should have comment or be unexported (golint)
    • Line 213: warning: exported function RunControllerManager should have comment or be unexported (golint)
    • Line 232: warning: context.Context should be the first parameter of a function (golint)
    • Line 264: warning: exported function WriteKubeConfig should have comment or be unexported (golint)
    • Line 281: warning: exported function WaitUntilCommandCompleted should have comment or be unexported (golint)
    • Line 293: warning: exported type ConfigArgs should have comment or be unexported (golint)
    • apiserver-builder/example/non-etcd/pkg/apis/filepath/v1/burger_types.go
    • Line 29: warning: comment on exported type Burger should be of the form "Burger ..." (with optional leading article) (golint)
    • Line 45: warning: exported method Burger.GetObjectMeta should have comment or be unexported (golint)
    • Line 49: warning: exported method Burger.NamespaceScoped should have comment or be unexported (golint)
    • Line 53: warning: exported method Burger.New should have comment or be unexported (golint)
    • Line 57: warning: exported method Burger.NewList should have comment or be unexported (golint)
    • Line 61: warning: exported method Burger.GetGroupVersionResource should have comment or be unexported (golint)
    • Line 69: warning: exported method Burger.IsStorageVersion should have comment or be unexported (golint)
    • Line 73: warning: comment on exported type BurgerList should be of the form "BurgerList ..." (with optional leading article) (golint)
    • Line 83: warning: exported method BurgerList.GetListMeta should have comment or be unexported (golint)
    • apiserver-builder/example/basic/pkg/apis/innsmouth/v1/deepone_types.go
    • Line 30: warning: comment on exported type DeepOne should be of the form "DeepOne ..." (with optional leading article) (golint)
    • Line 41: warning: exported type SamplePrimitiveAlias should have comment or be unexported (golint)
    • Line 43: warning: comment on exported type DeepOneSpec should be of the form "DeepOneSpec ..." (with optional leading article) (golint)
    • Line 67: warning: exported type SampleListElem should have comment or be unexported (golint)
    • Line 71: warning: exported type SampleListSubElem should have comment or be unexported (golint)
    • Line 75: warning: exported type SampleListPointerElem should have comment or be unexported (golint)
    • Line 79: warning: exported type SampleListPointerSubElem should have comment or be unexported (golint)
    • Line 83: warning: exported type SampleMapElem should have comment or be unexported (golint)
    • Line 87: warning: exported type SampleMapSubElem should have comment or be unexported (golint)
    • Line 91: warning: exported type SampleMapPointerElem should have comment or be unexported (golint)
    • Line 95: warning: exported type SampleMapPointerSubElem should have comment or be unexported (golint)
    • Line 99: warning: exported type SamplePointerElem should have comment or be unexported (golint)
    • Line 103: warning: exported type SamplePointerSubElem should have comment or be unexported (golint)
    • Line 107: warning: exported type SampleElem should have comment or be unexported (golint)
    • Line 111: warning: exported type SampleSubElem should have comment or be unexported (golint)
    • Line 124: warning: exported method DeepOne.GetObjectMeta should have comment or be unexported (golint)
    • Line 128: warning: exported method DeepOne.NamespaceScoped should have comment or be unexported (golint)
    • Line 132: warning: exported method DeepOne.New should have comment or be unexported (golint)
    • Line 136: warning: exported method DeepOne.NewList should have comment or be unexported (golint)
    • Line 140: warning: exported method DeepOne.GetGroupVersionResource should have comment or be unexported (golint)
    • Line 148: warning: exported method DeepOne.IsStorageVersion should have comment or be unexported (golint)
    • Line 152: warning: comment on exported type DeepOneList should be of the form "DeepOneList ..." (with optional leading article) (golint)
    • Line 162: warning: exported method DeepOneList.GetListMeta should have comment or be unexported (golint)
    • Line 169: warning: exported method DeepOneStatus.SubResourceName should have comment or be unexported (golint)
    • Line 173: warning: exported method DeepOne.GetStatus should have comment or be unexported (golint)
    • Line 177: warning: exported method DeepOneStatus.CopyTo should have comment or be unexported (golint)
    • apiserver-builder/example/podexec/pkg/apis/podexec/v1/pod_exec.go
    • Line 47: warning: comment on exported type PodExec should be of the form "PodExec ..." (with optional leading article) (golint)
    • Line 71: warning: exported method PodExec.SubResourceName should have comment or be unexported (golint)
    • Line 75: warning: exported method PodExec.New should have comment or be unexported (golint)
    • Line 79: warning: exported method PodExec.Connect should have comment or be unexported (golint)
    • Line 115: warning: exported method PodExec.NewConnectOptions should have comment or be unexported (golint)
    • Line 119: warning: exported method PodExec.ConnectMethods should have comment or be unexported (golint)
    • Line 133: warning: context.Context should be the first parameter of a function (golint)
    • Line 143: warning: context.Context should be the first parameter of a function (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words