diff options
Diffstat (limited to '')
31 files changed, 712 insertions, 0 deletions
diff --git a/qa/expected/test_commits/test_csv_hash_list_1 b/qa/expected/test_commits/test_csv_hash_list_1 new file mode 100644 index 0000000..bbd9f51 --- /dev/null +++ b/qa/expected/test_commits/test_csv_hash_list_1 @@ -0,0 +1,11 @@ +Commit {commit_sha2}: +1: T3 Title has trailing punctuation (.): "Sïmple title2." +3: B6 Body message is missing + +Commit {commit_sha1}: +1: T3 Title has trailing punctuation (.): "Sïmple title1." +3: B6 Body message is missing + +Commit {commit_sha4}: +1: T3 Title has trailing punctuation (.): "Sïmple title4." +3: B6 Body message is missing diff --git a/qa/expected/test_commits/test_ignore_commits_1 b/qa/expected/test_commits/test_ignore_commits_1 new file mode 100644 index 0000000..01cf8bd --- /dev/null +++ b/qa/expected/test_commits/test_ignore_commits_1 @@ -0,0 +1,13 @@ +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: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search +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: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search +Commit {commit_sha0}: +1: T3 Title has trailing punctuation (.): "Sïmple title4." + +Commit {commit_sha1}: +1: T5 Title contains the word 'WIP' (case-insensitive): "Sïmple WIP title3." + +Commit {commit_sha2}: +3: B5 Body message is too short (5<20): "Short" + +Commit {commit_sha3}: +1: T3 Title has trailing punctuation (.): "Sïmple title." diff --git a/qa/expected/test_commits/test_lint_head_1 b/qa/expected/test_commits/test_lint_head_1 new file mode 100644 index 0000000..d7ca594 --- /dev/null +++ b/qa/expected/test_commits/test_lint_head_1 @@ -0,0 +1,8 @@ +Commit {commit_sha0}: +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Sïmple title" + +Commit {commit_sha1}: +3: B6 Body message is missing + +Commit {commit_sha2}: +1: T3 Title has trailing punctuation (.): "Sïmple title." diff --git a/qa/expected/test_commits/test_lint_staged_msg_filename_1 b/qa/expected/test_commits/test_lint_staged_msg_filename_1 new file mode 100644 index 0000000..03a558c --- /dev/null +++ b/qa/expected/test_commits/test_lint_staged_msg_filename_1 @@ -0,0 +1,97 @@ +DEBUG: gitlint.cli To report issues, please visit https://github.com/jorisroovers/gitlint/issues +DEBUG: gitlint.cli Platform: {platform} +DEBUG: gitlint.cli Python version: {python_version} +DEBUG: gitlint.git ('--version',) +DEBUG: gitlint.cli Git version: {git_version} +DEBUG: gitlint.cli Gitlint version: {gitlint_version} +DEBUG: gitlint.cli GITLINT_USE_SH_LIB: {GITLINT_USE_SH_LIB} +DEBUG: gitlint.cli TERMINAL_ENCODING: {TERMINAL_ENCODING} +DEBUG: gitlint.cli FILE_ENCODING: {FILE_ENCODING} +DEBUG: gitlint.cli Configuration +config-path: None +[GENERAL] +extra-path: None +contrib: [] +ignore: +ignore-merge-commits: True +ignore-fixup-commits: True +ignore-fixup-amend-commits: True +ignore-squash-commits: True +ignore-revert-commits: True +ignore-stdin: False +staged: True +fail-without-commits: False +regex-style-search: False +verbosity: 3 +debug: True +target: {target} +[RULES] + I1: ignore-by-title + ignore=all + regex=None + I2: ignore-by-body + ignore=all + regex=None + I3: ignore-body-lines + regex=None + I4: ignore-by-author-name + ignore=all + regex=None + T1: title-max-length + line-length=72 + T2: title-trailing-whitespace + T6: title-leading-whitespace + T3: title-trailing-punctuation + T4: title-hard-tab + T5: title-must-not-contain-word + words=WIP + T7: title-match-regex + regex=None + T8: title-min-length + min-length=5 + B1: body-max-line-length + line-length=80 + B5: body-min-length + min-length=20 + B6: body-is-missing + ignore-merge-commits=True + B2: body-trailing-whitespace + B3: body-hard-tab + B4: body-first-line-empty + B7: body-changed-file-mention + files= + B8: body-match-regex + regex=None + M1: author-valid-email + regex=^[^@ ]+@[^@ ]+\.[^@ ]+ + +DEBUG: gitlint.cli Fetching additional meta-data from staged commit +DEBUG: gitlint.cli Using --msg-filename. +DEBUG: gitlint.git ('config', '--get', 'core.commentchar') +DEBUG: gitlint.cli Linting 1 commit(s) +DEBUG: gitlint.lint Linting commit [SHA UNKNOWN] +DEBUG: gitlint.git ('diff', '--staged', '--numstat', '-r') +DEBUG: gitlint.git ('config', '--get', 'user.name') +DEBUG: gitlint.git ('config', '--get', 'user.email') +DEBUG: gitlint.git ('rev-parse', '--abbrev-ref', 'HEAD') +DEBUG: gitlint.lint Commit Object +--- Commit Message ---- +WIP: from fïle test. +--- Meta info --------- +Author: gitlint-test-user <gitlint@test.com> +Date: {staged_date} +is-merge-commit: False +is-fixup-commit: False +is-fixup-amend-commit: False +is-squash-commit: False +is-revert-commit: False +Parents: [] +Branches: ['main'] +Changed Files: {changed_files} +Changed Files Stats: + {changed_files_stats} +----------------------- +1: T3 Title has trailing punctuation (.): "WIP: from fïle test." +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: from fïle test." +3: B6 Body message is missing +DEBUG: gitlint.cli Exit Code = 3 diff --git a/qa/expected/test_commits/test_lint_staged_stdin_1 b/qa/expected/test_commits/test_lint_staged_stdin_1 new file mode 100644 index 0000000..7892865 --- /dev/null +++ b/qa/expected/test_commits/test_lint_staged_stdin_1 @@ -0,0 +1,99 @@ +DEBUG: gitlint.cli To report issues, please visit https://github.com/jorisroovers/gitlint/issues +DEBUG: gitlint.cli Platform: {platform} +DEBUG: gitlint.cli Python version: {python_version} +DEBUG: gitlint.git ('--version',) +DEBUG: gitlint.cli Git version: {git_version} +DEBUG: gitlint.cli Gitlint version: {gitlint_version} +DEBUG: gitlint.cli GITLINT_USE_SH_LIB: {GITLINT_USE_SH_LIB} +DEBUG: gitlint.cli TERMINAL_ENCODING: {TERMINAL_ENCODING} +DEBUG: gitlint.cli FILE_ENCODING: {FILE_ENCODING} +DEBUG: gitlint.cli Configuration +config-path: None +[GENERAL] +extra-path: None +contrib: [] +ignore: +ignore-merge-commits: True +ignore-fixup-commits: True +ignore-fixup-amend-commits: True +ignore-squash-commits: True +ignore-revert-commits: True +ignore-stdin: False +staged: True +fail-without-commits: False +regex-style-search: False +verbosity: 3 +debug: True +target: {target} +[RULES] + I1: ignore-by-title + ignore=all + regex=None + I2: ignore-by-body + ignore=all + regex=None + I3: ignore-body-lines + regex=None + I4: ignore-by-author-name + ignore=all + regex=None + T1: title-max-length + line-length=72 + T2: title-trailing-whitespace + T6: title-leading-whitespace + T3: title-trailing-punctuation + T4: title-hard-tab + T5: title-must-not-contain-word + words=WIP + T7: title-match-regex + regex=None + T8: title-min-length + min-length=5 + B1: body-max-line-length + line-length=80 + B5: body-min-length + min-length=20 + B6: body-is-missing + ignore-merge-commits=True + B2: body-trailing-whitespace + B3: body-hard-tab + B4: body-first-line-empty + B7: body-changed-file-mention + files= + B8: body-match-regex + regex=None + M1: author-valid-email + regex=^[^@ ]+@[^@ ]+\.[^@ ]+ + +DEBUG: gitlint.cli Fetching additional meta-data from staged commit +DEBUG: gitlint.cli Stdin data: 'WIP: Pïpe test. +' +DEBUG: gitlint.cli Stdin detected and not ignored. Using as input. +DEBUG: gitlint.git ('config', '--get', 'core.commentchar') +DEBUG: gitlint.cli Linting 1 commit(s) +DEBUG: gitlint.lint Linting commit [SHA UNKNOWN] +DEBUG: gitlint.git ('diff', '--staged', '--numstat', '-r') +DEBUG: gitlint.git ('config', '--get', 'user.name') +DEBUG: gitlint.git ('config', '--get', 'user.email') +DEBUG: gitlint.git ('rev-parse', '--abbrev-ref', 'HEAD') +DEBUG: gitlint.lint Commit Object +--- Commit Message ---- +WIP: Pïpe test. +--- Meta info --------- +Author: gitlint-test-user <gitlint@test.com> +Date: {staged_date} +is-merge-commit: False +is-fixup-commit: False +is-fixup-amend-commit: False +is-squash-commit: False +is-revert-commit: False +Parents: [] +Branches: ['main'] +Changed Files: {changed_files} +Changed Files Stats: + {changed_files_stats} +----------------------- +1: T3 Title has trailing punctuation (.): "WIP: Pïpe test." +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Pïpe test." +3: B6 Body message is missing +DEBUG: gitlint.cli Exit Code = 3 diff --git a/qa/expected/test_commits/test_violations_1 b/qa/expected/test_commits/test_violations_1 new file mode 100644 index 0000000..6f3f9e2 --- /dev/null +++ b/qa/expected/test_commits/test_violations_1 @@ -0,0 +1,7 @@ +Commit {commit_sha2}: +1: T3 Title has trailing punctuation (.): "Sïmple title3." +3: B6 Body message is missing + +Commit {commit_sha1}: +1: T3 Title has trailing punctuation (.): "Sïmple title2." +3: B6 Body message is missing diff --git a/qa/expected/test_config/test_config_from_env_1 b/qa/expected/test_config/test_config_from_env_1 new file mode 100644 index 0000000..91eee40 --- /dev/null +++ b/qa/expected/test_config/test_config_from_env_1 @@ -0,0 +1,104 @@ +DEBUG: gitlint.cli To report issues, please visit https://github.com/jorisroovers/gitlint/issues +DEBUG: gitlint.cli Platform: {platform} +DEBUG: gitlint.cli Python version: {python_version} +DEBUG: gitlint.git ('--version',) +DEBUG: gitlint.cli Git version: {git_version} +DEBUG: gitlint.cli Gitlint version: {gitlint_version} +DEBUG: gitlint.cli GITLINT_USE_SH_LIB: {GITLINT_USE_SH_LIB} +DEBUG: gitlint.cli TERMINAL_ENCODING: {TERMINAL_ENCODING} +DEBUG: gitlint.cli FILE_ENCODING: {FILE_ENCODING} +DEBUG: gitlint.cli Configuration +config-path: None +[GENERAL] +extra-path: None +contrib: ['CC1', 'CT1'] +ignore: T1,T2 +ignore-merge-commits: True +ignore-fixup-commits: True +ignore-fixup-amend-commits: True +ignore-squash-commits: True +ignore-revert-commits: True +ignore-stdin: True +staged: False +fail-without-commits: True +regex-style-search: False +verbosity: 2 +debug: True +target: {target} +[RULES] + I1: ignore-by-title + ignore=all + regex=None + I2: ignore-by-body + ignore=all + regex=None + I3: ignore-body-lines + regex=None + I4: ignore-by-author-name + ignore=all + regex=None + T1: title-max-length + line-length=72 + T2: title-trailing-whitespace + T6: title-leading-whitespace + T3: title-trailing-punctuation + T4: title-hard-tab + T5: title-must-not-contain-word + words=WIP + T7: title-match-regex + regex=None + T8: title-min-length + min-length=5 + B1: body-max-line-length + line-length=80 + B5: body-min-length + min-length=20 + B6: body-is-missing + ignore-merge-commits=True + B2: body-trailing-whitespace + B3: body-hard-tab + B4: body-first-line-empty + B7: body-changed-file-mention + files= + B8: body-match-regex + regex=None + M1: author-valid-email + 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 + +DEBUG: gitlint.cli No --msg-filename flag, no or empty data passed to stdin. Using the local repo. +DEBUG: gitlint.git ('rev-list', '{commit_sha}') +DEBUG: gitlint.cli Linting 1 commit(s) +DEBUG: gitlint.git ('log', '{commit_sha}', '-1', '--pretty=%aN%x00%aE%x00%ai%x00%P%n%B') +DEBUG: gitlint.git ('config', '--get', 'core.commentchar') +DEBUG: gitlint.lint Linting commit {commit_sha} +DEBUG: gitlint.git ('diff-tree', '--no-commit-id', '--numstat', '-r', '--root', '{commit_sha}') +DEBUG: gitlint.git ('branch', '--contains', '{commit_sha}') +DEBUG: gitlint.lint Commit Object +--- Commit Message ---- +WIP: Thïs is a title thåt is a bit longer. +Content on the second line +This line of the body is here because we need it + +--- Meta info --------- +Author: gitlint-test-user <gitlint@test.com> +Date: {commit_date} +is-merge-commit: False +is-fixup-commit: False +is-fixup-amend-commit: False +is-squash-commit: False +is-revert-commit: False +Parents: [] +Branches: ['main'] +Changed Files: {changed_files} +Changed Files Stats: + {changed_files_stats} +----------------------- +1: CC1 Body does not contain a 'Signed-off-by' line +1: CT1 Title does not start with one of fix, feat, chore, docs, style, refactor, perf, test, revert, ci, build +1: T3 Title has trailing punctuation (.) +1: T5 Title contains the word 'WIP' (case-insensitive) +2: B4 Second line is not empty +DEBUG: gitlint.cli Exit Code = 5 diff --git a/qa/expected/test_config/test_config_from_env_2 b/qa/expected/test_config/test_config_from_env_2 new file mode 100644 index 0000000..06b0c1b --- /dev/null +++ b/qa/expected/test_config/test_config_from_env_2 @@ -0,0 +1,93 @@ +DEBUG: gitlint.cli To report issues, please visit https://github.com/jorisroovers/gitlint/issues +DEBUG: gitlint.cli Platform: {platform} +DEBUG: gitlint.cli Python version: {python_version} +DEBUG: gitlint.git ('--version',) +DEBUG: gitlint.cli Git version: {git_version} +DEBUG: gitlint.cli Gitlint version: {gitlint_version} +DEBUG: gitlint.cli GITLINT_USE_SH_LIB: {GITLINT_USE_SH_LIB} +DEBUG: gitlint.cli TERMINAL_ENCODING: {TERMINAL_ENCODING} +DEBUG: gitlint.cli FILE_ENCODING: {FILE_ENCODING} +DEBUG: gitlint.cli Configuration +config-path: None +[GENERAL] +extra-path: None +contrib: [] +ignore: +ignore-merge-commits: True +ignore-fixup-commits: True +ignore-fixup-amend-commits: True +ignore-squash-commits: True +ignore-revert-commits: True +ignore-stdin: False +staged: True +fail-without-commits: False +regex-style-search: False +verbosity: 0 +debug: True +target: {target} +[RULES] + I1: ignore-by-title + ignore=all + regex=None + I2: ignore-by-body + ignore=all + regex=None + I3: ignore-body-lines + regex=None + I4: ignore-by-author-name + ignore=all + regex=None + T1: title-max-length + line-length=72 + T2: title-trailing-whitespace + T6: title-leading-whitespace + T3: title-trailing-punctuation + T4: title-hard-tab + T5: title-must-not-contain-word + words=WIP + T7: title-match-regex + regex=None + T8: title-min-length + min-length=5 + B1: body-max-line-length + line-length=80 + B5: body-min-length + min-length=20 + B6: body-is-missing + ignore-merge-commits=True + B2: body-trailing-whitespace + B3: body-hard-tab + B4: body-first-line-empty + B7: body-changed-file-mention + files= + B8: body-match-regex + regex=None + M1: author-valid-email + regex=^[^@ ]+@[^@ ]+\.[^@ ]+ + +DEBUG: gitlint.cli Fetching additional meta-data from staged commit +DEBUG: gitlint.cli Using --msg-filename. +DEBUG: gitlint.git ('config', '--get', 'core.commentchar') +DEBUG: gitlint.cli Linting 1 commit(s) +DEBUG: gitlint.lint Linting commit [SHA UNKNOWN] +DEBUG: gitlint.git ('diff', '--staged', '--numstat', '-r') +DEBUG: gitlint.git ('config', '--get', 'user.name') +DEBUG: gitlint.git ('config', '--get', 'user.email') +DEBUG: gitlint.git ('rev-parse', '--abbrev-ref', 'HEAD') +DEBUG: gitlint.lint Commit Object +--- Commit Message ---- +WIP: msg-fïlename test. +--- Meta info --------- +Author: gitlint-test-user <gitlint@test.com> +Date: {date} +is-merge-commit: False +is-fixup-commit: False +is-fixup-amend-commit: False +is-squash-commit: False +is-revert-commit: False +Parents: [] +Branches: ['main'] +Changed Files: [] +Changed Files Stats: {{}} +----------------------- +DEBUG: gitlint.cli Exit Code = 3 diff --git a/qa/expected/test_config/test_config_from_file_1 b/qa/expected/test_config/test_config_from_file_1 new file mode 100644 index 0000000..6fe434a --- /dev/null +++ b/qa/expected/test_config/test_config_from_file_1 @@ -0,0 +1,5 @@ +1: T1 Title exceeds max length (42>20) +1: T5 Title contains the word 'WIP' (case-insensitive) +1: T5 Title contains the word 'thåt' (case-insensitive) +2: B4 Second line is not empty +3: B1 Line exceeds max length (48>30) diff --git a/qa/expected/test_config/test_config_from_file_debug_1 b/qa/expected/test_config/test_config_from_file_debug_1 new file mode 100644 index 0000000..279fb32 --- /dev/null +++ b/qa/expected/test_config/test_config_from_file_debug_1 @@ -0,0 +1,101 @@ +DEBUG: gitlint.cli To report issues, please visit https://github.com/jorisroovers/gitlint/issues +DEBUG: gitlint.cli Platform: {platform} +DEBUG: gitlint.cli Python version: {python_version} +DEBUG: gitlint.git ('--version',) +DEBUG: gitlint.cli Git version: {git_version} +DEBUG: gitlint.cli Gitlint version: {gitlint_version} +DEBUG: gitlint.cli GITLINT_USE_SH_LIB: {GITLINT_USE_SH_LIB} +DEBUG: gitlint.cli TERMINAL_ENCODING: {TERMINAL_ENCODING} +DEBUG: gitlint.cli FILE_ENCODING: {FILE_ENCODING} +DEBUG: gitlint.cli Configuration +config-path: {config_path} +[GENERAL] +extra-path: None +contrib: [] +ignore: title-trailing-punctuation,B2 +ignore-merge-commits: True +ignore-fixup-commits: True +ignore-fixup-amend-commits: True +ignore-squash-commits: True +ignore-revert-commits: True +ignore-stdin: False +staged: False +fail-without-commits: False +regex-style-search: False +verbosity: 2 +debug: True +target: {target} +[RULES] + I1: ignore-by-title + ignore=all + regex=None + I2: ignore-by-body + ignore=all + regex=None + I3: ignore-body-lines + regex=None + I4: ignore-by-author-name + ignore=all + regex=None + T1: title-max-length + line-length=20 + T2: title-trailing-whitespace + T6: title-leading-whitespace + T3: title-trailing-punctuation + T4: title-hard-tab + T5: title-must-not-contain-word + words=WIP,thåt + T7: title-match-regex + regex=None + T8: title-min-length + min-length=5 + B1: body-max-line-length + line-length=30 + B5: body-min-length + min-length=20 + B6: body-is-missing + ignore-merge-commits=True + B2: body-trailing-whitespace + B3: body-hard-tab + B4: body-first-line-empty + B7: body-changed-file-mention + files= + B8: body-match-regex + regex=None + M1: author-valid-email + 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') +DEBUG: gitlint.cli Linting 1 commit(s) +DEBUG: gitlint.git ('log', '{commit_sha}', '-1', '--pretty=%aN%x00%aE%x00%ai%x00%P%n%B') +DEBUG: gitlint.git ('config', '--get', 'core.commentchar') +DEBUG: gitlint.lint Linting commit {commit_sha} +DEBUG: gitlint.git ('diff-tree', '--no-commit-id', '--numstat', '-r', '--root', '{commit_sha}') +DEBUG: gitlint.git ('branch', '--contains', '{commit_sha}') +DEBUG: gitlint.lint Commit Object +--- Commit Message ---- +WIP: Thïs is a title thåt is a bit longer. +Content on the second line +This line of the body is here because we need it + +--- Meta info --------- +Author: gitlint-test-user <gitlint@test.com> +Date: {commit_date} +is-merge-commit: False +is-fixup-commit: False +is-fixup-amend-commit: False +is-squash-commit: False +is-revert-commit: False +Parents: [] +Branches: ['main'] +Changed Files: {changed_files} +Changed Files Stats: + {changed_files_stats} +----------------------- +1: T1 Title exceeds max length (42>20) +1: T5 Title contains the word 'WIP' (case-insensitive) +1: T5 Title contains the word 'thåt' (case-insensitive) +2: B4 Second line is not empty +3: B1 Line exceeds max length (48>30) +DEBUG: gitlint.cli Exit Code = 5 diff --git a/qa/expected/test_config/test_set_rule_option_1 b/qa/expected/test_config/test_set_rule_option_1 new file mode 100644 index 0000000..10b5e50 --- /dev/null +++ b/qa/expected/test_config/test_set_rule_option_1 @@ -0,0 +1,3 @@ +1: T1 Title exceeds max length (16>5): "This ïs a title." +1: T3 Title has trailing punctuation (.): "This ïs a title." +3: B6 Body message is missing diff --git a/qa/expected/test_config/test_verbosity_1 b/qa/expected/test_config/test_verbosity_1 new file mode 100644 index 0000000..0202072 --- /dev/null +++ b/qa/expected/test_config/test_verbosity_1 @@ -0,0 +1,3 @@ +1: T3 Title has trailing punctuation (.) +1: T5 Title contains the word 'WIP' (case-insensitive) +2: B4 Second line is not empty diff --git a/qa/expected/test_config/test_verbosity_2 b/qa/expected/test_config/test_verbosity_2 new file mode 100644 index 0000000..5a54082 --- /dev/null +++ b/qa/expected/test_config/test_verbosity_2 @@ -0,0 +1,3 @@ +1: T3 Title has trailing punctuation (.): "WIP: Thïs is a title." +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Thïs is a title." +2: B4 Second line is not empty: "Contënt on the second line" diff --git a/qa/expected/test_contrib/test_contrib_rules_1 b/qa/expected/test_contrib/test_contrib_rules_1 new file mode 100644 index 0000000..6ab7512 --- /dev/null +++ b/qa/expected/test_contrib/test_contrib_rules_1 @@ -0,0 +1,3 @@ +1: CC1 Body does not contain a 'Signed-off-by' line +1: CT1 Title does not follow ConventionalCommits.org format 'type(optional-scope): description': "WIP Thi$ is å title" +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP Thi$ is å title" diff --git a/qa/expected/test_contrib/test_contrib_rules_with_config_1 b/qa/expected/test_contrib/test_contrib_rules_with_config_1 new file mode 100644 index 0000000..6ab7512 --- /dev/null +++ b/qa/expected/test_contrib/test_contrib_rules_with_config_1 @@ -0,0 +1,3 @@ +1: CC1 Body does not contain a 'Signed-off-by' line +1: CT1 Title does not follow ConventionalCommits.org format 'type(optional-scope): description': "WIP Thi$ is å title" +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP Thi$ is å title" diff --git a/qa/expected/test_gitlint/test_commit_binary_file_1 b/qa/expected/test_gitlint/test_commit_binary_file_1 new file mode 100644 index 0000000..83faf1b --- /dev/null +++ b/qa/expected/test_gitlint/test_commit_binary_file_1 @@ -0,0 +1,95 @@ +DEBUG: gitlint.cli To report issues, please visit https://github.com/jorisroovers/gitlint/issues +DEBUG: gitlint.cli Platform: {platform} +DEBUG: gitlint.cli Python version: {python_version} +DEBUG: gitlint.git ('--version',) +DEBUG: gitlint.cli Git version: {git_version} +DEBUG: gitlint.cli Gitlint version: {gitlint_version} +DEBUG: gitlint.cli GITLINT_USE_SH_LIB: {GITLINT_USE_SH_LIB} +DEBUG: gitlint.cli TERMINAL_ENCODING: {TERMINAL_ENCODING} +DEBUG: gitlint.cli FILE_ENCODING: {FILE_ENCODING} +DEBUG: gitlint.cli Configuration +config-path: None +[GENERAL] +extra-path: None +contrib: [] +ignore: +ignore-merge-commits: True +ignore-fixup-commits: True +ignore-fixup-amend-commits: True +ignore-squash-commits: True +ignore-revert-commits: True +ignore-stdin: False +staged: False +fail-without-commits: False +regex-style-search: False +verbosity: 3 +debug: True +target: {target} +[RULES] + I1: ignore-by-title + ignore=all + regex=None + I2: ignore-by-body + ignore=all + regex=None + I3: ignore-body-lines + regex=None + I4: ignore-by-author-name + ignore=all + regex=None + T1: title-max-length + line-length=72 + T2: title-trailing-whitespace + T6: title-leading-whitespace + T3: title-trailing-punctuation + T4: title-hard-tab + T5: title-must-not-contain-word + words=WIP + T7: title-match-regex + regex=None + T8: title-min-length + min-length=5 + B1: body-max-line-length + line-length=80 + B5: body-min-length + min-length=20 + B6: body-is-missing + ignore-merge-commits=True + B2: body-trailing-whitespace + B3: body-hard-tab + B4: body-first-line-empty + B7: body-changed-file-mention + files= + B8: body-match-regex + regex=None + M1: author-valid-email + 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') +DEBUG: gitlint.cli Linting 1 commit(s) +DEBUG: gitlint.git ('log', '{commit_sha}', '-1', '--pretty=%aN%x00%aE%x00%ai%x00%P%n%B') +DEBUG: gitlint.git ('config', '--get', 'core.commentchar') +DEBUG: gitlint.lint Linting commit {commit_sha} +DEBUG: gitlint.git ('diff-tree', '--no-commit-id', '--numstat', '-r', '--root', '{commit_sha}') +DEBUG: gitlint.git ('branch', '--contains', '{commit_sha}') +DEBUG: gitlint.lint Commit Object +--- Commit Message ---- +Sïmple commit + +--- Meta info --------- +Author: gitlint-test-user <gitlint@test.com> +Date: {commit_date} +is-merge-commit: False +is-fixup-commit: False +is-fixup-amend-commit: False +is-squash-commit: False +is-revert-commit: False +Parents: [] +Branches: ['main'] +Changed Files: {changed_files} +Changed Files Stats: + {changed_files_stats} +----------------------- +3: B6 Body message is missing +DEBUG: gitlint.cli Exit Code = 1 diff --git a/qa/expected/test_gitlint/test_msg_filename_1 b/qa/expected/test_gitlint/test_msg_filename_1 new file mode 100644 index 0000000..d01b23b --- /dev/null +++ b/qa/expected/test_gitlint/test_msg_filename_1 @@ -0,0 +1,3 @@ +1: T3 Title has trailing punctuation (.): "WIP: msg-fïlename test." +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: msg-fïlename test." +3: B6 Body message is missing diff --git a/qa/expected/test_gitlint/test_msg_filename_no_tty_1 b/qa/expected/test_gitlint/test_msg_filename_no_tty_1 new file mode 100644 index 0000000..4785e28 --- /dev/null +++ b/qa/expected/test_gitlint/test_msg_filename_no_tty_1 @@ -0,0 +1,3 @@ +1: T3 Title has trailing punctuation (.): "WIP: msg-fïlename NO TTY test." +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: msg-fïlename NO TTY test." +3: B6 Body message is missing diff --git a/qa/expected/test_gitlint/test_violations_1 b/qa/expected/test_gitlint/test_violations_1 new file mode 100644 index 0000000..7e55eda --- /dev/null +++ b/qa/expected/test_gitlint/test_violations_1 @@ -0,0 +1,3 @@ +1: T3 Title has trailing punctuation (.): "WIP: This ïs a title." +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: This ïs a title." +2: B4 Second line is not empty: "Content on the sëcond line" diff --git a/qa/expected/test_named_rules/test_named_rule_1 b/qa/expected/test_named_rules/test_named_rule_1 new file mode 100644 index 0000000..e5a380c --- /dev/null +++ b/qa/expected/test_named_rules/test_named_rule_1 @@ -0,0 +1,5 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: thåt dûr bår" +1: T5 Title contains the word 'thåt' (case-insensitive): "WIP: thåt dûr bår" +1: T5:even$more%wôrds Title contains the word 'bår' (case-insensitive): "WIP: thåt dûr bår" +1: T5:extra-wôrds Title contains the word 'dûr' (case-insensitive): "WIP: thåt dûr bår" +3: B5 Body message is too short (18<20): "Sïmple commit body" diff --git a/qa/expected/test_named_rules/test_named_user_rule_1 b/qa/expected/test_named_rules/test_named_user_rule_1 new file mode 100644 index 0000000..3cd18b4 --- /dev/null +++ b/qa/expected/test_named_rules/test_named_user_rule_1 @@ -0,0 +1,9 @@ +1: UC4 int-öption: 2 +1: UC4 str-öption: föo +1: UC4 list-öption: ['foo', 'bar'] +1: UC4:bår int-öption: 2 +1: UC4:bår str-öption: bår +1: UC4:bår list-öption: ['bar', 'list'] +1: UC4:föo int-öption: 3 +1: UC4:föo str-öption: föo +1: UC4:föo list-öption: ['foo', 'bar'] diff --git a/qa/expected/test_rules/test_ignore_rules_1 b/qa/expected/test_rules/test_ignore_rules_1 new file mode 100644 index 0000000..f87f303 --- /dev/null +++ b/qa/expected/test_rules/test_ignore_rules_1 @@ -0,0 +1,3 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Commït Tïtle" +3: B3 Line contains hard tab characters (\t): "Sïmple commit body" +4: B2 Line has trailing whitespace: "Anōther Line " diff --git a/qa/expected/test_rules/test_ignore_rules_2 b/qa/expected/test_rules/test_ignore_rules_2 new file mode 100644 index 0000000..dc6428c --- /dev/null +++ b/qa/expected/test_rules/test_ignore_rules_2 @@ -0,0 +1,2 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Commït Tïtle" +3: B3 Line contains hard tab characters (\t): "Sïmple commit body" diff --git a/qa/expected/test_rules/test_match_regex_rules_1 b/qa/expected/test_rules/test_match_regex_rules_1 new file mode 100644 index 0000000..3bfaa58 --- /dev/null +++ b/qa/expected/test_rules/test_match_regex_rules_1 @@ -0,0 +1,2 @@ +1: T7 Title does not match regex (foo): "Thåt dûr bår" +4: B8 Body does not match regex (bar) diff --git a/qa/expected/test_stdin/test_stdin_file_1 b/qa/expected/test_stdin/test_stdin_file_1 new file mode 100644 index 0000000..ea7fad2 --- /dev/null +++ b/qa/expected/test_stdin/test_stdin_file_1 @@ -0,0 +1,3 @@ +1: T3 Title has trailing punctuation (.): "WIP: STDIN ïs a file test." +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: STDIN ïs a file test." +3: B6 Body message is missing diff --git a/qa/expected/test_stdin/test_stdin_pipe_1 b/qa/expected/test_stdin/test_stdin_pipe_1 new file mode 100644 index 0000000..8714533 --- /dev/null +++ b/qa/expected/test_stdin/test_stdin_pipe_1 @@ -0,0 +1,3 @@ +1: T3 Title has trailing punctuation (.): "WIP: Pïpe test." +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Pïpe test." +3: B6 Body message is missing diff --git a/qa/expected/test_stdin/test_stdin_pipe_empty_1 b/qa/expected/test_stdin/test_stdin_pipe_empty_1 new file mode 100644 index 0000000..7e55eda --- /dev/null +++ b/qa/expected/test_stdin/test_stdin_pipe_empty_1 @@ -0,0 +1,3 @@ +1: T3 Title has trailing punctuation (.): "WIP: This ïs a title." +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: This ïs a title." +2: B4 Second line is not empty: "Content on the sëcond line" diff --git a/qa/expected/test_user_defined/test_user_defined_rules_examples_1 b/qa/expected/test_user_defined/test_user_defined_rules_examples_1 new file mode 100644 index 0000000..e675d7b --- /dev/null +++ b/qa/expected/test_user_defined/test_user_defined_rules_examples_1 @@ -0,0 +1,5 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Thi$ is å title" +1: UC2 Body does not contain a 'Signed-off-by' line +1: UC3 Branch name 'main' does not start with one of ['feature/', 'hotfix/', 'release/'] +1: UL1 Title contains the special character '$': "WIP: Thi$ is å title" +2: B4 Second line is not empty: "Content on the second line" diff --git a/qa/expected/test_user_defined/test_user_defined_rules_examples_2 b/qa/expected/test_user_defined/test_user_defined_rules_examples_2 new file mode 100644 index 0000000..d706b12 --- /dev/null +++ b/qa/expected/test_user_defined/test_user_defined_rules_examples_2 @@ -0,0 +1,5 @@ +1: UC2 Body does not contain a 'Signed-off-by' line +1: UC3 Branch name 'main' does not start with one of ['feature/', 'hotfix/', 'release/'] +1: UL1 Title contains the special character '$' +2: B4 Second line is not empty +3: B3 Line contains hard tab characters (\t) diff --git a/qa/expected/test_user_defined/test_user_defined_rules_examples_with_config_1 b/qa/expected/test_user_defined/test_user_defined_rules_examples_with_config_1 new file mode 100644 index 0000000..6e0d4cd --- /dev/null +++ b/qa/expected/test_user_defined/test_user_defined_rules_examples_with_config_1 @@ -0,0 +1,6 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Thi$ is å title" +1: UC1 Body contains too many lines (2 > 1) +1: UC2 Body does not contain a 'Signed-off-by' line +1: UC3 Branch name 'main' does not start with one of ['feature/', 'hotfix/', 'release/'] +1: UL1 Title contains the special character '$': "WIP: Thi$ is å title" +2: B4 Second line is not empty: "Content on the second line" diff --git a/qa/expected/test_user_defined/test_user_defined_rules_extra_1 b/qa/expected/test_user_defined/test_user_defined_rules_extra_1 new file mode 100644 index 0000000..77642dc --- /dev/null +++ b/qa/expected/test_user_defined/test_user_defined_rules_extra_1 @@ -0,0 +1,9 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Thi$ is å title" +1: UC1 GitContext.current_branch: main +1: UC1 GitContext.commentchar: # +1: UC2 GitCommit.branches: ['main'] +1: UC2 GitCommit.custom_prop: foöbar +1: UC4 int-öption: 2 +1: UC4 str-öption: föo +1: UC4 list-öption: ['foo', 'bar'] +4: B2 Line has trailing whitespace: "{repo-path} " |