(t *testing.T)
| 1095 | } |
| 1096 | |
| 1097 | func TestBodyLeadingBlank_EmptyBody_Pass(t *testing.T) { |
| 1098 | r := &rule.BodyLeadingBlankRule{} |
| 1099 | if err := r.Apply(lint.RuleSetting{}); err != nil { |
| 1100 | t.Fatal(err) |
| 1101 | } |
| 1102 | _, ok := r.Validate(&mockCommit{body: ""}) |
| 1103 | if !ok { |
| 1104 | t.Error("empty body should pass body-leading-blank") |
| 1105 | } |
| 1106 | } |
| 1107 | |
| 1108 | func TestFooterLeadingBlank_WithBlank_Pass(t *testing.T) { |
| 1109 | r := &rule.FooterLeadingBlankRule{} |