(t *testing.T)
| 404 | } |
| 405 | |
| 406 | func TestScopeMaxLen_NegativeDisables(t *testing.T) { |
| 407 | r := &rule.ScopeMaxLenRule{} |
| 408 | if err := r.Apply(lint.RuleSetting{Argument: -1}); err != nil { |
| 409 | t.Fatal(err) |
| 410 | } |
| 411 | _, ok := r.Validate(&mockCommit{scope: "very-long-scope-name"}) |
| 412 | if !ok { |
| 413 | t.Error("max=-1 should disable check") |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | func TestScopeCharset_Pass(t *testing.T) { |
| 418 | r := &rule.ScopeCharsetRule{} |