Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RuleForMessage ¶
RuleForMessage derives a stable rule bucket from a go/analysis diagnostic.
Types ¶
type Result ¶
type Result struct {
Linter string `json:"linter"`
WorkDir string `json:"work_dir,omitempty"`
PackageCount int `json:"package_count"`
Success bool `json:"success"`
Duration time.Duration `json:"duration"`
Violations []Violation `json:"violations,omitempty"`
Errors []string `json:"errors,omitempty"`
}
Result is the normalized lint result rendered by the CLI and JSON output.
func Run ¶
func Run(opts RunOptions) (*Result, error)
Run loads the requested Go packages, runs clickylint, and returns normalized diagnostics without printing through the go/analysis default text driver.
type RunOptions ¶
type RunOptions struct {
Packages []string `json:"packages,omitempty"`
WorkDir string `json:"work_dir,omitempty"`
IncludeTests bool `json:"include_tests"`
}
RunOptions controls the standalone clickylint runner used by the clicky CLI.
type SummaryView ¶
SummaryView renders clickylint results as a compact tree, matching the Gavel lint display shape: root -> linter -> rule -> affected files.
func NewSummaryView ¶
func NewSummaryView(result *Result, limit int) *SummaryView
NewSummaryView returns a tree view for a lint result.
func (*SummaryView) GetChildren ¶
func (s *SummaryView) GetChildren() []api.TreeNode
func (*SummaryView) Pretty ¶
func (s *SummaryView) Pretty() api.Text
type Violation ¶
type Violation struct {
Package string `json:"package,omitempty"`
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
Column int `json:"column,omitempty"`
Rule string `json:"rule,omitempty"`
Message string `json:"message,omitempty"`
}
Violation is a display-oriented analysis diagnostic.
Click to show internal directories.
Click to hide internal directories.