Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportViolations ¶
func ReportViolations(pass *analysis.Pass, violations []ConstructorViolation, ignoreSet *util.IgnoreSet)
ReportViolations reports constructor violations using the new pretty formatter
Types ¶
type ConstructorViolation ¶
type ConstructorViolation struct {
TypeName string
Reason string
Code string // Error code from codes package
Pos token.Pos
Node ast.Node
}
ConstructorViolation represents a constructor violation implements reporting.Violation
func CheckConstructor ¶
func CheckConstructor( config *config.Config, pass *analysis.Pass, packageAnnotations *annotations.PackageAnnotations, ) []ConstructorViolation
func (ConstructorViolation) GetCode ¶
func (v ConstructorViolation) GetCode() string
GetCode returns the error code for this violation
func (ConstructorViolation) GetMessage ¶
func (v ConstructorViolation) GetMessage() string
GetMessage returns the main error message without formatting
func (ConstructorViolation) GetPos ¶
func (v ConstructorViolation) GetPos() token.Pos
GetPos returns the position of the violation
Click to show internal directories.
Click to hide internal directories.