Documentation ¶
Overview ¶
Package rules contains specific rules as subpackages to check a Makefile against
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRule ¶
func RegisterRule(r Rule)
RegisterRule let's you register a rule for inclusion in the validator
Types ¶
type Rule ¶
type Rule interface { Name() string Description() string Run(parser.Makefile, RuleConfig) RuleViolationList }
Rule is the type of a rule function
type RuleConfig ¶
RuleConfig is a simple string/string map to hold key/value configuration for rules.
type RuleConfigMap ¶
type RuleConfigMap map[string]RuleConfig
RuleConfigMap is a map that stores RuleConfig maps keyed by the rule name
type RuleRegistry ¶
RuleRegistry is the type to hold rules keyed by their name
func GetRegisteredRules ¶
func GetRegisteredRules() RuleRegistry
GetRegisteredRules returns the internal ruleRegistry
type RuleViolation ¶
RuleViolation represents a basic validation failure
type RuleViolationList ¶
type RuleViolationList []RuleViolation
RuleViolationList is a list of Violation types and the return type of a Rule function
Directories ¶
Path | Synopsis |
---|---|
Package maxbodylength implements the ruleset for making sure target bodies are kept short and thus hopefully somewhat not complex.
|
Package maxbodylength implements the ruleset for making sure target bodies are kept short and thus hopefully somewhat not complex. |
Package minphony implements the ruleset for making sure required minimum phony targets are present
|
Package minphony implements the ruleset for making sure required minimum phony targets are present |
Package phonydeclared implements the ruleset for making sure all targets that don't have a rule body are marked PHONY
|
Package phonydeclared implements the ruleset for making sure all targets that don't have a rule body are marked PHONY |
Package timestampexpanded implements the ruleset for making sure a variable that likely represents a timestamp is simply expanded so it doesn't change in between rule executions.
|
Package timestampexpanded implements the ruleset for making sure a variable that likely represents a timestamp is simply expanded so it doesn't change in between rule executions. |
Click to show internal directories.
Click to hide internal directories.