Rule | Description | KPI | URL |
---|---|---|---|
golint-formComment | Comment on exported type should be of the valid form | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-allCaps | don’t use ALL_CAPS in Go names; use CamelCase | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-underscoreInPackageName | don’t use an underscore in package name | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-leadingK | don’t use leading k in Go names | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-avoidUnderscoresInGoName | don’t use underscores in Go names | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-errorEndString | error strings should not be capitalized or end with punctuation or a newline | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-errorVarName | error variable should have name of the form errFoo. | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-incorrectPackageComment | package comment should be of the form “NamePackage…”. | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-avoidSpaceInPackageComment | package comment should not have leading space | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-havePackageComment | should have a package comment, unless it’s in another file for this package | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-commentExportedType | comment on exported type should be of the form “Type …” (with optional leading article) |
Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-exportedShouldHaveComment | exported [type|var|method|struct] should have comment or be unexported | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-exportedDeclaration | exported * should have its own declaration | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-dotImports | should not use dot imports | Resource Utilization | https://github.com/golang/lint/blob/master/lint.go |
golint-mixedCapsError | don’t use MixedCaps in package name | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-omitType | should omit type from declaration of var. it will be inferred from the right-hand side | Accuracy | https://github.com/golang/lint/blob/master/lint.go |
golint-initialisms | Improper variable name | Understandability | https://github.com/golang/lint/blob/master/lint.go |
golint-replaceLintIncDec | Use increment or decrement operator | Maintainability | https://github.com/golang/lint/blob/master/lint.go |
golint-structFieldInitialisms | Struct field initialized incorrectly | Understandability | https://github.com/golang/lint/blob/master/lint.go |
vet-asmdecl | Mismatches between assembly files and Go function declarations. | Understandability | https://golang.org/cmd/vet/#hdr-Assembly_declarations |
vet-uselessAssignment | Check for useless assignments. | Maintainability | https://golang.org/cmd/vet/#hdr-Useless_assignments |
vet-atomicMistakes | Common mistaken usages of the sync/atomic package | Maintainability | https://golang.org/cmd/vet/#hdr-Atomic_mistakes |
vet-buildTags | Badly formed or misplaced +build tags. | Understandability | https://golang.org/cmd/vet/#hdr-Build_tags |
vet-cgocallInvalid | Detect some violations of the cgo pointer passing rules. | Understandability | https://golang.org/cmd/vet/#hdr-Invalid_uses_of_cgo |
vet-composites | Composite struct literals that do not use the field-keyed syntax. | Understandability | https://golang.org/cmd/vet/#hdr-Unkeyed_composite_literals |
vet-nonstandardMethodSignature | Non-standard signatures for methods with familiar names, including:
Format GobEncode GobDecode MarshalJSON MarshalXML |
Understandability | https://golang.org/cmd/vet/#hdr-Methods |
vet-nilfunc | Comparisons between functions and nil | Maintainability | https://golang.org/cmd/vet/#hdr-Nil_function_comparison |
vet-structtags | Struct tags that do not follow the format understood by reflect.StructTag.Get. Well-known encoding struct tags (json, xml) used with unexported fields. | Accuracy | https://golang.org/cmd/vet/#hdr-Struct_tags |
vet-testsExamples | Mistakes involving tests including functions with incorrect names or signatures and example tests that document identifiers not in the package | Understandability | https://golang.org/cmd/vet/#hdr-Tests_and_documentation_examples |
structcheck-unusedStructField | Unused struct field | Maintainability | https://github.com/opennota/check |
ineffassign-ineffectualAssignment | Detect ineffectual assignments in Go code | Maintainability | https://github.com/gordonklaus/ineffassign |
gotype-importNotUsed | Check if imports are not used | Maintainability | https://godoc.org/golang.org/x/tools/cmd/gotype |
gotype-invalidOpr | invalid operation | Accuracy | https://godoc.org/golang.org/x/tools/cmd/gotype |
gotype-undeclaredName | Undeclared name | Understandability | https://godoc.org/golang.org/x/tools/cmd/gotype |
gotype-invalidOperand | Invalid Operand | Understandability | https://godoc.org/golang.org/x/tools/cmd/gotype |
gotype-incorrectUseOfArg | Incorrect use of variable as argument | Robustness | https://godoc.org/golang.org/x/tools/cmd/gotype |
gotype-varNotDeclared | Var not declared by package | Understandability | https://godoc.org/golang.org/x/tools/cmd/gotype |