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

Function TestLint_InvalidCommits

test/lint_test.go:110–123  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

108}
109
110func TestLint_InvalidCommits(t *testing.T) {
111 linter := newDefaultLinter(t)
112 for _, tc := range invalidCommitCases {
113 t.Run(tc.name, func(t *testing.T) {
114 result, err := linter.ParseAndLint(tc.msg)
115 if err != nil {
116 t.Fatalf("unexpected error: %v", err)
117 }
118 if len(result.Issues()) < tc.wantMin {
119 t.Errorf("expected >= %d issues for %q, got %d", tc.wantMin, tc.msg, len(result.Issues()))
120 }
121 })
122 }
123}
124
125// ---------------------------------------------------------------------------
126// Specific rule-violation checks (verify the exact rule name in issues)

Callers

nothing calls this directly

Calls 3

newDefaultLinterFunction · 0.85
ParseAndLintMethod · 0.80
IssuesMethod · 0.80

Tested by

no test coverage detected