diff options
Diffstat (limited to 'qa')
-rw-r--r-- | qa/expected/debug_output1 | 3 | ||||
-rw-r--r-- | qa/samples/config/ignore-release-commits | 6 | ||||
-rw-r--r-- | qa/test_commits.py | 5 |
3 files changed, 11 insertions, 3 deletions
diff --git a/qa/expected/debug_output1 b/qa/expected/debug_output1 index 80bee74..93d7ff7 100644 --- a/qa/expected/debug_output1 +++ b/qa/expected/debug_output1 @@ -15,8 +15,11 @@ debug: True target: {target} [RULES] I1: ignore-by-title + ignore=all regex=None + I2: ignore-by-body ignore=all + regex=None T1: title-max-length line-length=20 T2: title-trailing-whitespace diff --git a/qa/samples/config/ignore-release-commits b/qa/samples/config/ignore-release-commits index 898e73f..5807c96 100644 --- a/qa/samples/config/ignore-release-commits +++ b/qa/samples/config/ignore-release-commits @@ -1,3 +1,7 @@ [ignore-by-title] regex=^Release(.*) -ignore=T5,T3
\ No newline at end of file +ignore=T5,T3 + +[ignore-by-body] +regex=(.*)relëase(.*) +ignore=T3,B3
\ No newline at end of file diff --git a/qa/test_commits.py b/qa/test_commits.py index 0d306e1..ddff660 100644 --- a/qa/test_commits.py +++ b/qa/test_commits.py @@ -83,7 +83,8 @@ class CommitsTests(BaseTestCase): # But in this case only B5 because T3 and T5 are being ignored because of config self._create_simple_commit(u"Release: WIP tïtle.\n\nShort", git_repo=tmp_git_repo) # In the following 2 commits, the T3 violations are as normal - self._create_simple_commit(u"Sïmple title3.\n\nSimple bödy describing the commit3", git_repo=tmp_git_repo) + self._create_simple_commit( + u"Sïmple WIP title3.\n\nThis is \ta relëase commit\nMore info", git_repo=tmp_git_repo) self._create_simple_commit(u"Sïmple title4.\n\nSimple bödy describing the commit4", git_repo=tmp_git_repo) revlist = git("rev-list", "HEAD", _err_to_out=True, _cwd=tmp_git_repo).split() @@ -95,7 +96,7 @@ class CommitsTests(BaseTestCase): u"Commit {0}:\n".format(revlist[0][:10]) + u"1: T3 Title has trailing punctuation (.): \"Sïmple title4.\"\n\n" + u"Commit {0}:\n".format(revlist[1][:10]) + - u"1: T3 Title has trailing punctuation (.): \"Sïmple title3.\"\n\n" + + u"1: T5 Title contains the word 'WIP' (case-insensitive): \"Sïmple WIP title3.\"\n\n" + u"Commit {0}:\n".format(revlist[2][:10]) + u"3: B5 Body message is too short (5<20): \"Short\"\n\n" + u"Commit {0}:\n".format(revlist[3][:10]) + |