RegisterRule registers a custom rule. Returns an error if a rule with the same name is already registered.
(r lint.Rule)
| 17 | // RegisterRule registers a custom rule. |
| 18 | // Returns an error if a rule with the same name is already registered. |
| 19 | func 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. |