Preparing report...

Report for knative.dev/discovery

A+    Excellent!    Found 14 issues across 72 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!


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.


golint81%

Golint is a linter for Go source code.

    • /knative.dev/discovery/pkg/reconciler/testing/v1alpha1/listers.go
    • Line 39: warning: exported function AddConverters should have comment or be unexported (golint)
    • Line 55: warning: exported type Listers should have comment or be unexported (golint)
    • Line 59: warning: exported function NewListers should have comment or be unexported (golint)
    • Line 71: warning: exported function ToKnownObjects should have comment or be unexported (golint)
    • Line 102: warning: exported function NewScheme should have comment or be unexported (golint)
    • Line 111: warning: exported method Listers.NewScheme should have comment or be unexported (golint)
    • Line 120: warning: exported method Listers.GetKubeObjects should have comment or be unexported (golint)
    • Line 124: warning: exported method Listers.GetAPIExtentionsObjects should have comment or be unexported (golint)
    • Line 128: warning: exported method Listers.GetCustomResourceDefinitionLister should have comment or be unexported (golint)
    • Line 132: warning: exported method Listers.GetDiscoveryObjects should have comment or be unexported (golint)
    • Line 136: warning: exported method Listers.GetClusterDuckTypeLister should have comment or be unexported (golint)
    • /knative.dev/discovery/cmd/webhook/main.go
    • Line 48: warning: exported function NewDefaultingAdmissionController should have comment or be unexported (golint)
    • Line 72: warning: exported function NewValidationAdmissionController should have comment or be unexported (golint)
    • Line 99: warning: exported function NewConfigValidationController should have comment or be unexported (golint)
    • /knative.dev/discovery/pkg/apis/discovery/v1alpha1/clusterducktype_types.go
    • Line 105: warning: comment on exported type DuckVersion should be of the form "DuckVersion ..." (with optional leading article) (golint)
    • Line 124: warning: comment on exported type CustomResourceDefinitionSelector should be of the form "CustomResourceDefinitionSelector ..." (with optional leading article) (golint)
    • Line 151: warning: exported const ClusterScoped should have comment (or a comment on this block) or be unexported (golint)
    • Line 183: warning: comment on exported method ResourceRef.GroupVersion should be of the form "GroupVersion ..." (golint)
    • /knative.dev/discovery/pkg/reconciler/testing/featured/featured.go
    • Line 40: warning: should not use dot imports (golint)
    • Line 49: warning: exported function Run should have comment or be unexported (golint)
    • Line 75: warning: exported function InitializeTestSuite should have comment or be unexported (golint)
    • Line 79: warning: exported function TestReconcileKind should have comment or be unexported (golint)
    • Line 94: warning: exported function ReconcileKindFeatureContext should have comment or be unexported (golint)
    • Line 157: warning: exported type ReconcilerTest 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!