Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigRule ¶
type ConfigRule struct { Severity Severity `yaml:"severity"` Data interface{} `yaml:"data"` // Data can be anything }
Rule represents an individual rule with an ID and severity.
type Issue ¶
type Issue struct { Rule string `json:"rule"` Category string `json:"category"` Filename string `json:"filename"` Message string `json:"message"` Suggestion string `json:"suggestion"` Note string `json:"note"` Start token.Position `json:"start"` End token.Position `json:"end"` Confidence float64 `json:"confidence"` // 0.0 to 1.0 Severity Severity `json:"severity"` }
Issue represents a lint issue found in the code base.
func (*Issue) MarshalJSON ¶
type IssueWithoutFilename ¶
type IssueWithoutFilename struct { Rule string `json:"rule"` Category string `json:"category"` Message string `json:"message"` Suggestion string `json:"suggestion"` Note string `json:"note"` Start PositionWithoutFilename `json:"start"` End PositionWithoutFilename `json:"end"` Confidence float64 `json:"confidence"` Severity Severity `json:"severity"` }
type PositionWithoutFilename ¶
type PositionWithoutFilename struct { Offset int `json:"offset"` Line int `json:"line"` Column int `json:"column"` }
PositionWithoutFilename represents a position in the code base without the filename to simplify json marsheling.
type Severity ¶
type Severity int // Severity of the lint rule
func (Severity) MarshalJSON ¶
MarshalJSON marshals the Severity to JSON as a string.
func (Severity) UnmarshalJSON ¶
func (*Severity) UnmarshalYAML ¶
UnmarshalYAML unmarshals the Severity from YAML as a string.
Click to show internal directories.
Click to hide internal directories.