(t *testing.T)
| 426 | } |
| 427 | |
| 428 | func TestScopeCharset_Fail(t *testing.T) { |
| 429 | r := &rule.ScopeCharsetRule{} |
| 430 | if err := r.Apply(lint.RuleSetting{Argument: "abcdefghijklmnopqrstuvwxyz"}); err != nil { |
| 431 | t.Fatal(err) |
| 432 | } |
| 433 | _, ok := r.Validate(&mockCommit{scope: "Auth"}) |
| 434 | if ok { |
| 435 | t.Error("uppercase scope should fail") |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | // --- Description length rules --- |
| 440 |