Rule Description KPI URL
golint-formComment Comment on exported type should be of the valid form Understandability
golint-allCaps don’t use ALL_CAPS in Go names; use CamelCase Understandability
golint-underscoreInPackageName don’t use an underscore in package name Understandability
golint-leadingK don’t use leading k in Go names Understandability
golint-avoidUnderscoresInGoName don’t use underscores in Go names Understandability
golint-errorEndString error strings should not be capitalized or end with punctuation or a newline Understandability
golint-errorVarName error variable should have name of the form errFoo. Understandability
golint-incorrectPackageComment package comment should be of the form “NamePackage…”. Understandability
golint-avoidSpaceInPackageComment package comment should not have leading space Understandability
golint-havePackageComment should have a package comment, unless it’s in another file for this package Understandability
golint-commentExportedType comment on exported type should be of the form “Type
…” (with optional leading article)
golint-exportedShouldHaveComment exported [type|var|method|struct] should have comment or be unexported Understandability
golint-exportedDeclaration exported * should have its own declaration Understandability
golint-dotImports should not use dot imports Resource Utilization
golint-mixedCapsError don’t use MixedCaps in package name Understandability
golint-omitType should omit type from declaration of var. it will be inferred from the right-hand side Accuracy
golint-initialisms Improper variable name Understandability
golint-replaceLintIncDec Use increment or decrement operator Maintainability
golint-structFieldInitialisms Struct field initialized incorrectly Understandability
vet-asmdecl Mismatches between assembly files and Go function declarations. Understandability
vet-uselessAssignment Check for useless assignments. Maintainability
vet-atomicMistakes Common mistaken usages of the sync/atomic package Maintainability
vet-buildTags Badly formed or misplaced +build tags. Understandability
vet-cgocallInvalid Detect some violations of the cgo pointer passing rules. Understandability
vet-composites Composite struct literals that do not use the field-keyed syntax. Understandability
vet-nonstandardMethodSignature Non-standard signatures for methods with familiar names, including:

Format GobEncode GobDecode MarshalJSON MarshalXML
Peek ReadByte ReadFrom ReadRune Scan Seek
UnmarshalJSON UnreadByte UnreadRune WriteByte

vet-nilfunc Comparisons between functions and nil Maintainability
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
vet-testsExamples Mistakes involving tests including functions with incorrect names or signatures and example tests that document identifiers not in the package Understandability
structcheck-unusedStructField Unused struct field Maintainability
ineffassign-ineffectualAssignment Detect ineffectual assignments in Go code Maintainability
gotype-importNotUsed Check if imports are not used Maintainability
gotype-invalidOpr invalid operation Accuracy
gotype-undeclaredName Undeclared name Understandability
gotype-invalidOperand Invalid Operand Understandability
gotype-incorrectUseOfArg Incorrect use of variable as argument Robustness
gotype-varNotDeclared Var not declared by package Understandability