Preparing report...

Report for github.com/istio/tools

A+    Excellent!    Found 21 issues across 118 files

Tweet

gofmt98%

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!


gocyclo94%

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.

    • tools/cmd/protoc-gen-docs/htmlGenerator.go
    • Line 345: warning: cyclomatic complexity 30 of function (*htmlGenerator).generateFileHeader() is high (> 15) (gocyclo)
    • Line 693: warning: cyclomatic complexity 29 of function (*htmlGenerator).generateComment() is high (> 15) (gocyclo)
    • Line 471: warning: cyclomatic complexity 21 of function (*htmlGenerator).generateMessage() is high (> 15) (gocyclo)
    • Line 239: warning: cyclomatic complexity 21 of function (*htmlGenerator).generateFile() is high (> 15) (gocyclo)
    • tools/cmd/cue-gen/genoapi.go
    • Line 170: warning: cyclomatic complexity 31 of function main() is high (> 15) (gocyclo)
    • Line 476: warning: cyclomatic complexity 17 of function (*builder).genOpenAPI() is high (> 15) (gocyclo)
    • Line 395: warning: cyclomatic complexity 16 of function (*builder).genCRD() is high (> 15) (gocyclo)

golint89%

Golint is a linter for Go source code.

    • tools/cmd/annotations_prep/main.go
    • Line 182: warning: exported type FeatureStatus should have comment or be unexported (golint)
    • Line 185: warning: exported const Alpha should have comment (or a comment on this block) or be unexported (golint)
    • Line 382: warning: exported type Variable should have comment or be unexported (golint)
    • Line 405: warning: exported type AnnotationConfiguration should have comment or be unexported (golint)
    • Line 409: warning: exported type LabelConfiguration should have comment or be unexported (golint)
    • tools/pkg/protomodel/frontMatter.go
    • Line 25: warning: exported type Mode should have comment or be unexported (golint)
    • Line 28: warning: exported var ModeUnset should have comment or be unexported (golint)
    • Line 34: warning: exported type FrontMatter should have comment or be unexported (golint)
    • tools/pkg/protomodel/messageDescriptor.go
    • Line 21: warning: exported type MessageDescriptor should have comment or be unexported (golint)
    • Line 30: warning: exported type FieldDescriptor should have comment or be unexported (golint)
    • Line 76: warning: exported method FieldDescriptor.IsRepeated should have comment or be unexported (golint)
    • tools/pkg/protomodel/model.go
    • Line 24: warning: comment on exported type Model should be of the form "Model ..." (with optional leading article) (golint)
    • Line 31: warning: exported function NewModel should have comment or be unexported (golint)
    • tools/perf/benchmark/security/generate_policies/generate_policies.go
    • Line 40: warning: exported type SecurityPolicy should have comment or be unexported (golint)
    • Line 47: warning: exported type AuthorizationPolicy should have comment or be unexported (golint)
    • Line 62: warning: exported type PeerAuthentication should have comment or be unexported (golint)
    • Line 67: warning: exported type RequestAuthentication should have comment or be unexported (golint)
    • Line 76: warning: exported type MyPolicy should have comment or be unexported (golint)
    • Line 82: warning: exported type MetadataStruct should have comment or be unexported (golint)
    • Line 87: warning: exported function ToJSON should have comment or be unexported (golint)
    • Line 91: warning: exported function ToJSONWithIndent should have comment or be unexported (golint)
    • Line 100: warning: exported function ToYAML should have comment or be unexported (golint)
    • Line 109: warning: exported function PolicyToYAML 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!