(t *testing.T)
| 935 | } |
| 936 | |
| 937 | func TestDescriptionEmptyRule_EmptyFails(t *testing.T) { |
| 938 | r := &rule.DescriptionEmptyRule{} |
| 939 | if err := r.Apply(lint.RuleSetting{}); err != nil { |
| 940 | t.Fatal(err) |
| 941 | } |
| 942 | _, ok := r.Validate(&mockCommit{description: ""}) |
| 943 | if ok { |
| 944 | t.Error("empty description should fail description-empty rule") |
| 945 | } |
| 946 | } |
| 947 | |
| 948 | // ============================================================ |
| 949 | // Full-stop rules |