diff options
author | Joris Roovers <joris.roovers@gmail.com> | 2022-10-03 10:29:59 +0000 |
---|---|---|
committer | Joris Roovers <joris.roovers@gmail.com> | 2022-10-24 11:43:30 +0200 |
commit | 2cf1102b38a79f770d2b33dfe9bd652d7b7f7350 (patch) | |
tree | cb7827c2d2a4a6d2bf0e0790656a730840c6312b /qa | |
parent | 55b6719bb97299ce07179b0aebc5c456815958b1 (diff) |
Log warning when general.regex-style-search=False
- Adds a new Deprecration class that allows for a global approach to various
deprecation scenarios.
- The new Deprecation.get_regex_method function deals specifically with the
general.regex-style-search option and behavior.
- Updated rules that use Deprecation.get_regex_method: IgnoreByTitle,
IgnoreByBody, IgnoreBodyLines, IgnoreByAuthorName, AuthorValidEmail
Relates to #254
Diffstat (limited to 'qa')
7 files changed, 8 insertions, 6 deletions
diff --git a/qa/expected/test_commits/test_ignore_commits_1 b/qa/expected/test_commits/test_ignore_commits_1 index f9062c1..0d20789 100644 --- a/qa/expected/test_commits/test_ignore_commits_1 +++ b/qa/expected/test_commits/test_ignore_commits_1 @@ -1,3 +1,5 @@ +WARNING: I1 - ignore-by-title: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-by-title.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: TODO +WARNING: I2 - ignore-by-body: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-by-body.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: TODO Commit {commit_sha0}: 1: T3 Title has trailing punctuation (.): "Sïmple title4." diff --git a/qa/expected/test_commits/test_lint_staged_msg_filename_1 b/qa/expected/test_commits/test_lint_staged_msg_filename_1 index f765199..f2ab49e 100644 --- a/qa/expected/test_commits/test_lint_staged_msg_filename_1 +++ b/qa/expected/test_commits/test_lint_staged_msg_filename_1 @@ -62,7 +62,7 @@ target: {target} B8: body-match-regex regex=None M1: author-valid-email - regex=[^@ ]+@[^@ ]+\.[^@ ]+ + regex=^[^@ ]+@[^@ ]+\.[^@ ]+ DEBUG: gitlint.cli Fetching additional meta-data from staged commit DEBUG: gitlint.cli Using --msg-filename. diff --git a/qa/expected/test_commits/test_lint_staged_stdin_1 b/qa/expected/test_commits/test_lint_staged_stdin_1 index badb502..cf34b8b 100644 --- a/qa/expected/test_commits/test_lint_staged_stdin_1 +++ b/qa/expected/test_commits/test_lint_staged_stdin_1 @@ -62,7 +62,7 @@ target: {target} B8: body-match-regex regex=None M1: author-valid-email - regex=[^@ ]+@[^@ ]+\.[^@ ]+ + regex=^[^@ ]+@[^@ ]+\.[^@ ]+ DEBUG: gitlint.cli Fetching additional meta-data from staged commit DEBUG: gitlint.cli Stdin data: 'WIP: Pïpe test. diff --git a/qa/expected/test_config/test_config_from_env_1 b/qa/expected/test_config/test_config_from_env_1 index f396aa3..38fba21 100644 --- a/qa/expected/test_config/test_config_from_env_1 +++ b/qa/expected/test_config/test_config_from_env_1 @@ -62,7 +62,7 @@ target: {target} B8: body-match-regex regex=None M1: author-valid-email - regex=[^@ ]+@[^@ ]+\.[^@ ]+ + regex=^[^@ ]+@[^@ ]+\.[^@ ]+ CC1: contrib-body-requires-signed-off-by CT1: contrib-title-conventional-commits types=fix,feat,chore,docs,style,refactor,perf,test,revert,ci,build diff --git a/qa/expected/test_config/test_config_from_env_2 b/qa/expected/test_config/test_config_from_env_2 index 460212b..50d1e3f 100644 --- a/qa/expected/test_config/test_config_from_env_2 +++ b/qa/expected/test_config/test_config_from_env_2 @@ -62,7 +62,7 @@ target: {target} B8: body-match-regex regex=None M1: author-valid-email - regex=[^@ ]+@[^@ ]+\.[^@ ]+ + regex=^[^@ ]+@[^@ ]+\.[^@ ]+ DEBUG: gitlint.cli Fetching additional meta-data from staged commit DEBUG: gitlint.cli Using --msg-filename. diff --git a/qa/expected/test_config/test_config_from_file_debug_1 b/qa/expected/test_config/test_config_from_file_debug_1 index e344919..39bdf52 100644 --- a/qa/expected/test_config/test_config_from_file_debug_1 +++ b/qa/expected/test_config/test_config_from_file_debug_1 @@ -62,7 +62,7 @@ target: {target} B8: body-match-regex regex=None M1: author-valid-email - regex=[^@ ]+@[^@ ]+\.[^@ ]+ + regex=^[^@ ]+@[^@ ]+\.[^@ ]+ DEBUG: gitlint.cli No --msg-filename flag, no or empty data passed to stdin. Using the local repo. DEBUG: gitlint.git ('log', '-1', '--pretty=%H') diff --git a/qa/expected/test_gitlint/test_commit_binary_file_1 b/qa/expected/test_gitlint/test_commit_binary_file_1 index 23b86de..6bc119b 100644 --- a/qa/expected/test_gitlint/test_commit_binary_file_1 +++ b/qa/expected/test_gitlint/test_commit_binary_file_1 @@ -62,7 +62,7 @@ target: {target} B8: body-match-regex regex=None M1: author-valid-email - regex=[^@ ]+@[^@ ]+\.[^@ ]+ + regex=^[^@ ]+@[^@ ]+\.[^@ ]+ DEBUG: gitlint.cli No --msg-filename flag, no or empty data passed to stdin. Using the local repo. DEBUG: gitlint.git ('log', '-1', '--pretty=%H') |