(t *testing.T)
| 869 | } |
| 870 | |
| 871 | func TestScopeEmptyRule_EmptyFails(t *testing.T) { |
| 872 | r := &rule.ScopeEmptyRule{} |
| 873 | if err := r.Apply(lint.RuleSetting{}); err != nil { |
| 874 | t.Fatal(err) |
| 875 | } |
| 876 | _, ok := r.Validate(&mockCommit{scope: ""}) |
| 877 | if ok { |
| 878 | t.Error("empty scope should fail scope-empty rule") |
| 879 | } |
| 880 | } |
| 881 | |
| 882 | func TestBodyEmptyRule_NonEmptyPasses(t *testing.T) { |
| 883 | r := &rule.BodyEmptyRule{} |