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