MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / TestDefaultRulesNoDuplicates

Function TestDefaultRulesNoDuplicates

registry/registry_test.go:5–13  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3import "testing"
4
5func TestDefaultRulesNoDuplicates(t *testing.T) {
6 m := make(map[string]struct{})
7 for _, r := range Rules() {
8 if _, ok := m[r.Name()]; ok {
9 t.Errorf("duplicate rule name: %s", r.Name())
10 }
11 m[r.Name()] = struct{}{}
12 }
13}
14
15func TestDefaultFormattersNoDuplicates(t *testing.T) {
16 m := make(map[string]struct{})

Callers

nothing calls this directly

Calls 2

RulesFunction · 0.85
NameMethod · 0.65

Tested by

no test coverage detected