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

Function TestIgnore_RevertReapply

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

Source from the content-addressed store, hash-verified

67}
68
69func TestIgnore_RevertReapply(t *testing.T) {
70 msgs := []string{
71 `Revert "feat: add new feature"`,
72 `revert "fix: something"`,
73 "Revert some commit",
74 `Reapply "feat: add feature"`,
75 `reapply "fix: something"`,
76 }
77 linter := newDefaultLinter(t)
78 for _, msg := range msgs {
79 result, err := linter.ParseAndLint(msg)
80 if err != nil {
81 t.Fatalf("error for %q: %v", msg, err)
82 }
83 if len(result.Issues()) != 0 {
84 t.Errorf("expected %q to be ignored, got %d issues", msg, len(result.Issues()))
85 }
86 }
87}
88
89func TestIgnore_FixupSquashAmend(t *testing.T) {
90 msgs := []string{

Callers

nothing calls this directly

Calls 3

newDefaultLinterFunction · 0.85
ParseAndLintMethod · 0.80
IssuesMethod · 0.80

Tested by

no test coverage detected