(t *testing.T)
| 1136 | } |
| 1137 | |
| 1138 | func TestFooterLeadingBlank_EmptyFooter_Pass(t *testing.T) { |
| 1139 | r := &rule.FooterLeadingBlankRule{} |
| 1140 | if err := r.Apply(lint.RuleSetting{}); err != nil { |
| 1141 | t.Fatal(err) |
| 1142 | } |
| 1143 | _, ok := r.Validate(&mockCommit{footer: ""}) |
| 1144 | if !ok { |
| 1145 | t.Error("empty footer should pass footer-leading-blank") |
| 1146 | } |
| 1147 | } |
| 1148 | |
| 1149 | // ============================================================ |
| 1150 | // Header-trim rule |