MCPcopy Index your code
hub / github.com/conventionalcommit/commitlint / RegisterRule

Function RegisterRule

registry/registry.go:19–21  ·  view source on GitHub ↗

RegisterRule registers a custom rule. Returns an error if a rule with the same name is already registered.

(r lint.Rule)

Source from the content-addressed store, hash-verified

17// RegisterRule registers a custom rule.
18// Returns an error if a rule with the same name is already registered.
19func RegisterRule(r lint.Rule) error {
20 return globalRegistry.RegisterRule(r)
21}
22
23// RegisterFormatter registers a custom formatter.
24// Returns an error if a formatter with the same name is already registered.

Callers 1

TestRegisterCustomRuleFunction · 0.85

Calls 1

RegisterRuleMethod · 0.80

Tested by 1

TestRegisterCustomRuleFunction · 0.68