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

Function TestIgnore_NotIgnored

test/ignore_test.go:147–165  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

145}
146
147func TestIgnore_NotIgnored(t *testing.T) {
148 msgs := []string{
149 "merge something random",
150 "fixup something",
151 "initial commit",
152 "just some random text",
153 }
154 linter := newDefaultLinter(t)
155 for _, msg := range msgs {
156 result, err := linter.ParseAndLint(msg)
157 if err != nil {
158 t.Fatalf("error for %q: %v", msg, err)
159 }
160 // These should NOT be ignored, should produce issues
161 if len(result.Issues()) == 0 {
162 t.Errorf("expected %q to NOT be ignored (should have issues)", msg)
163 }
164 }
165}
166
167func TestIgnore_EmptyPatterns_NoSkip(t *testing.T) {
168 conf := config.NewDefault()

Callers

nothing calls this directly

Calls 3

newDefaultLinterFunction · 0.85
ParseAndLintMethod · 0.80
IssuesMethod · 0.80

Tested by

no test coverage detected