(t *testing.T)
| 1184 | } |
| 1185 | |
| 1186 | func TestHeaderTrim_BothSpaces_Fail(t *testing.T) { |
| 1187 | r := &rule.HeaderTrimRule{} |
| 1188 | if err := r.Apply(lint.RuleSetting{}); err != nil { |
| 1189 | t.Fatal(err) |
| 1190 | } |
| 1191 | _, ok := r.Validate(&mockCommit{header: " feat: add feature "}) |
| 1192 | if ok { |
| 1193 | t.Error("header with both-sides whitespace should fail header-trim") |
| 1194 | } |
| 1195 | } |
| 1196 | |
| 1197 | // ============================================================ |
| 1198 | // Signed-off-by and trailer-exists rules |