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

Function TestIgnore_MergeBranch

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

Source from the content-addressed store, hash-verified

27}
28
29func TestIgnore_MergeBranch(t *testing.T) {
30 msgs := []string{
31 "Merge branch 'feature-x'",
32 "Merge branch 'release/1.0' into main",
33 "Merge feature into main",
34 "Merge tag 'v1.0.0'",
35 "Merge remote-tracking branch 'origin/main'",
36 "Merge remote-tracking branch 'origin/main' into develop",
37 }
38 linter := newDefaultLinter(t)
39 for _, msg := range msgs {
40 result, err := linter.ParseAndLint(msg)
41 if err != nil {
42 t.Fatalf("error for %q: %v", msg, err)
43 }
44 if len(result.Issues()) != 0 {
45 t.Errorf("expected %q to be ignored, got %d issues", msg, len(result.Issues()))
46 }
47 }
48}
49
50func TestIgnore_MergedPR(t *testing.T) {
51 msgs := []string{

Callers

nothing calls this directly

Calls 3

newDefaultLinterFunction · 0.85
ParseAndLintMethod · 0.80
IssuesMethod · 0.80

Tested by

no test coverage detected