Preparing report...

Report for sigs.k8s.io/controller-tools

(v0.7.0)

A+    Excellent!    Found 26 issues across 88 files

Tweet

gofmt92%

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!


gocyclo90%

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.

    • pkg/markers/parse.go
    • Line 767: warning: cyclomatic complexity 24 of function (*Definition).Parse() is high (> 15) (gocyclo)
    • Line 471: warning: cyclomatic complexity 23 of function (*Argument).parse() is high (> 15) (gocyclo)
    • Line 255: warning: cyclomatic complexity 17 of function guessType() is high (> 15) (gocyclo)
    • pkg/crd/spec.go
    • Line 43: warning: cyclomatic complexity 21 of function (*Parser).NeedCRDFor() is high (> 15) (gocyclo)

golint81%

Golint is a linter for Go source code.

    • pkg/genall/output.go
    • Line 104: warning: exported method OutputToDirectory.Open should have comment or be unexported (golint)
    • Line 145: warning: exported method OutputArtifacts.Open should have comment or be unexported (golint)
    • pkg/genall/help/pretty/print.go
    • Line 64: warning: exported method Table.WriteTo should have comment or be unexported (golint)
    • Line 95: warning: exported method Table.VisualLength should have comment or be unexported (golint)
    • Line 110: warning: exported method Text.VisualLength should have comment or be unexported (golint)
    • Line 111: warning: exported method Text.WriteTo should have comment or be unexported (golint)
    • Line 222: warning: exported method SpanWriter.VisualLength should have comment or be unexported (golint)
    • Line 229: warning: exported method SpanWriter.WriteTo should have comment or be unexported (golint)
    • pkg/crd/gen.go
    • Line 77: warning: exported method Generator.CheckFilter should have comment or be unexported (golint)
    • Line 80: warning: exported method Generator.RegisterMarkers should have comment or be unexported (golint)
    • Line 83: warning: exported method Generator.Generate should have comment or be unexported (golint)
    • pkg/crd/parser.go
    • Line 195: warning: exported method Parser.NeedFlattenedSchemaFor should have comment or be unexported (golint)
    • pkg/crd/markers/validation.go
    • Line 30: warning: exported const SchemalessName should have comment (or a comment on this block) or be unexported (golint)
    • Line 123: warning: comment on exported type Maximum should be of the form "Maximum ..." (with optional leading article) (golint)
    • Line 127: warning: comment on exported type Minimum should be of the form "Minimum ..." (with optional leading article) (golint)
    • Line 131: warning: comment on exported type ExclusiveMinimum should be of the form "ExclusiveMinimum ..." (with optional leading article) (golint)
    • Line 135: warning: comment on exported type ExclusiveMaximum should be of the form "ExclusiveMaximum ..." (with optional leading article) (golint)
    • Line 139: warning: comment on exported type MultipleOf should be of the form "MultipleOf ..." (with optional leading article) (golint)
    • Line 143: warning: comment on exported type MaxLength should be of the form "MaxLength ..." (with optional leading article) (golint)
    • Line 147: warning: comment on exported type MinLength should be of the form "MinLength ..." (with optional leading article) (golint)
    • Line 151: warning: comment on exported type Pattern should be of the form "Pattern ..." (with optional leading article) (golint)
    • Line 155: warning: comment on exported type MaxItems should be of the form "MaxItems ..." (with optional leading article) (golint)
    • Line 159: warning: comment on exported type MinItems should be of the form "MinItems ..." (with optional leading article) (golint)
    • Line 163: warning: comment on exported type UniqueItems should be of the form "UniqueItems ..." (with optional leading article) (golint)
    • Line 167: warning: comment on exported type MaxProperties should be of the form "MaxProperties ..." (with optional leading article) (golint)
    • Line 171: warning: comment on exported type MinProperties should be of the form "MinProperties ..." (with optional leading article) (golint)
    • Line 175: warning: comment on exported type Enum should be of the form "Enum ..." (with optional leading article) (golint)
    • Line 179: warning: comment on exported type Format should be of the form "Format ..." (with optional leading article) (golint)
    • Line 186: warning: comment on exported type Type should be of the form "Type ..." (with optional leading article) (golint)
    • Line 193: warning: comment on exported type Nullable should be of the form "Nullable ..." (with optional leading article) (golint)
    • Line 199: warning: comment on exported type Default should be of the form "Default ..." (with optional leading article) (golint)
    • Line 212: warning: comment on exported type XPreserveUnknownFields should be of the form "XPreserveUnknownFields ..." (with optional leading article) (golint)
    • Line 227: warning: comment on exported type XEmbeddedResource should be of the form "XEmbeddedResource ..." (with optional leading article) (golint)
    • Line 236: warning: comment on exported type XIntOrString should be of the form "XIntOrString ..." (with optional leading article) (golint)
    • Line 244: warning: comment on exported type Schemaless should be of the form "Schemaless ..." (with optional leading article) (golint)
    • Line 254: warning: exported method Maximum.ApplyToSchema should have comment or be unexported (golint)
    • Line 262: warning: exported method Minimum.ApplyToSchema should have comment or be unexported (golint)
    • Line 270: warning: exported method ExclusiveMaximum.ApplyToSchema should have comment or be unexported (golint)
    • Line 277: warning: exported method ExclusiveMinimum.ApplyToSchema should have comment or be unexported (golint)
    • Line 284: warning: exported method MultipleOf.ApplyToSchema should have comment or be unexported (golint)
    • Line 293: warning: exported method MaxLength.ApplyToSchema should have comment or be unexported (golint)
    • Line 301: warning: exported method MinLength.ApplyToSchema should have comment or be unexported (golint)
    • Line 309: warning: exported method Pattern.ApplyToSchema should have comment or be unexported (golint)
    • Line 320: warning: exported method MaxItems.ApplyToSchema should have comment or be unexported (golint)
    • Line 328: warning: exported method MinItems.ApplyToSchema should have comment or be unexported (golint)
    • Line 336: warning: exported method UniqueItems.ApplyToSchema should have comment or be unexported (golint)
    • Line 344: warning: exported method MinProperties.ApplyToSchema should have comment or be unexported (golint)
    • Line 353: warning: exported method MaxProperties.ApplyToSchema should have comment or be unexported (golint)
    • Line 362: warning: exported method Enum.ApplyToSchema should have comment or be unexported (golint)
    • Line 379: warning: exported method Format.ApplyToSchema should have comment or be unexported (golint)
    • Line 389: warning: exported method Type.ApplyToSchema should have comment or be unexported (golint)
    • Line 394: warning: exported method Type.ApplyFirst should have comment or be unexported (golint)
    • Line 396: warning: exported method Nullable.ApplyToSchema should have comment or be unexported (golint)
    • Line 401: warning: comment on exported method Default.ApplyToSchema should be of the form "ApplyToSchema ..." (golint)
    • Line 411: warning: exported method XPreserveUnknownFields.ApplyToSchema should have comment or be unexported (golint)
    • Line 417: warning: exported method XEmbeddedResource.ApplyToSchema should have comment or be unexported (golint)
    • Line 425: warning: exported method XIntOrString.ApplyToSchema should have comment or be unexported (golint)
    • Line 430: warning: exported method XIntOrString.ApplyFirst should have comment or be unexported (golint)
    • pkg/rbac/parser.go
    • Line 154: warning: exported method Generator.RegisterMarkers should have comment or be unexported (golint)
    • Line 256: warning: exported method Generator.Generate should have comment or be unexported (golint)
    • pkg/schemapatcher/gen.go
    • Line 82: warning: exported method Generator.CheckFilter should have comment or be unexported (golint)
    • Line 86: warning: exported method Generator.RegisterMarkers should have comment or be unexported (golint)
    • Line 90: warning: exported method Generator.Generate should have comment or be unexported (golint)
    • pkg/webhook/parser.go
    • Line 286: warning: exported method Generator.RegisterMarkers should have comment or be unexported (golint)
    • Line 294: warning: exported method Generator.Generate should have comment or be unexported (golint)
    • pkg/crd/markers/crd.go
    • Line 68: warning: exported method SubresourceStatus.ApplyToCRD should have comment or be unexported (golint)
    • Line 107: warning: exported method SubresourceScale.ApplyToCRD should have comment or be unexported (golint)
    • Line 140: warning: exported method StorageVersion.ApplyToCRD should have comment or be unexported (golint)
    • Line 166: warning: exported method SkipVersion.ApplyToCRD should have comment or be unexported (golint)
    • Line 217: warning: exported method PrintColumn.ApplyToCRD should have comment or be unexported (golint)
    • Line 282: warning: exported method Resource.ApplyToCRD should have comment or be unexported (golint)
    • Line 309: warning: exported method UnservedVersion.ApplyToCRD should have comment or be unexported (golint)
    • Line 331: warning: exported method DeprecatedVersion.ApplyToCRD should have comment or be unexported (golint)
    • pkg/crd/markers/topology.go
    • Line 102: warning: exported method ListType.ApplyToSchema should have comment or be unexported (golint)
    • Line 114: warning: exported method ListType.ApplyFirst should have comment or be unexported (golint)
    • Line 116: warning: exported method ListMapKey.ApplyToSchema should have comment or be unexported (golint)
    • Line 127: warning: exported method MapType.ApplyToSchema should have comment or be unexported (golint)
    • Line 142: warning: exported method StructType.ApplyToSchema should have comment or be unexported (golint)
    • pkg/markers/parse.go
    • Line 83: warning: comment on exported const InvalidType should be of the form "InvalidType ..." (golint)
    • Line 916: warning: exported type ScannerError 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!