MCPcopy Create free account
hub / github.com/vale-cli/vale / AddRule

Method AddRule

internal/check/manager.go:80–86  ·  view source on GitHub ↗

AddRule adds the given rule to the manager.

(name string, rule Rule)

Source from the content-addressed store, hash-verified

78
79// AddRule adds the given rule to the manager.
80func (mgr *Manager) AddRule(name string, rule Rule) error {
81 if _, found := mgr.rules[name]; !found {
82 mgr.rules[name] = rule
83 return nil
84 }
85 return fmt.Errorf("the rule '%s' has already been added", name)
86}
87
88// AddRuleFromFile adds the given rule to the manager.
89func (mgr *Manager) AddRuleFromFile(name, path string) error {

Callers 1

addCheckMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected