--------------------------------------------------------------------------- Multiple issues in a single commit ---------------------------------------------------------------------------
(t *testing.T)
| 302 | // --------------------------------------------------------------------------- |
| 303 | |
| 304 | func TestLint_MultipleIssues(t *testing.T) { |
| 305 | // "invalid: x" -> type-enum (invalid) + header-min-length (10 chars, "invalid: x" = 10) |
| 306 | // Actually "invalid: x" = 10 chars so header-min passes. Use something shorter. |
| 307 | // "xx: y" -> type: "xx" not in enum (5 chars header < 10) |
| 308 | linter := newDefaultLinter(t) |
| 309 | result, err := linter.ParseAndLint("xx: y") |
| 310 | if err != nil { |
| 311 | t.Fatal(err) |
| 312 | } |
| 313 | if len(result.Issues()) < 2 { |
| 314 | t.Errorf("expected >= 2 issues (type-enum + header-min-length), got %d", len(result.Issues())) |
| 315 | for _, iss := range result.Issues() { |
| 316 | t.Logf(" %s: %s", iss.RuleName(), iss.Description()) |
| 317 | } |
| 318 | } |
| 319 | } |
nothing calls this directly
no test coverage detected