Documentation
¶
Overview ¶
Package modernize detects and fixes known YAML config anti-patterns in workflow configuration files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct {
RuleID string `json:"rule_id"`
Line int `json:"line"`
Description string `json:"description"`
}
Change represents a modification applied by a rule's Fix function.
type Finding ¶
type Finding struct {
RuleID string `json:"rule_id"`
Line int `json:"line"`
Message string `json:"message"`
Fixable bool `json:"fixable"`
}
Finding represents a single issue detected by a modernize rule.
type Rule ¶
type Rule struct {
ID string
Description string
Severity string // "error" or "warning"
Check func(root *yaml.Node, raw []byte) []Finding
Fix func(root *yaml.Node) []Change
}
Rule defines a modernize transformation rule.
func FilterRules ¶
FilterRules filters the rule list based on include/exclude flags.
Click to show internal directories.
Click to hide internal directories.