summaryrefslogtreecommitdiffstats
path: root/gitlint/tests/expected/test_cli
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-03-19 14:00:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-03-19 14:00:14 +0000
commitdf9615bac55ac6f1c3f516b66279ac0007175030 (patch)
tree84dd81d1c97835271cea7fbdd67c074742365e07 /gitlint/tests/expected/test_cli
parentInitial commit. (diff)
downloadgitlint-df9615bac55ac6f1c3f516b66279ac0007175030.tar.xz
gitlint-df9615bac55ac6f1c3f516b66279ac0007175030.zip
Adding upstream version 0.13.1.upstream/0.13.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gitlint/tests/expected/test_cli')
-rw-r--r--gitlint/tests/expected/test_cli/test_contrib_13
-rw-r--r--gitlint/tests/expected/test_cli/test_debug_1102
-rw-r--r--gitlint/tests/expected/test_cli/test_input_stream_13
-rw-r--r--gitlint/tests/expected/test_cli/test_input_stream_debug_13
-rw-r--r--gitlint/tests/expected/test_cli/test_input_stream_debug_271
-rw-r--r--gitlint/tests/expected/test_cli/test_lint_multiple_commits_18
-rw-r--r--gitlint/tests/expected/test_cli/test_lint_multiple_commits_config_16
-rw-r--r--gitlint/tests/expected/test_cli/test_lint_staged_msg_filename_12
-rw-r--r--gitlint/tests/expected/test_cli/test_lint_staged_msg_filename_270
-rw-r--r--gitlint/tests/expected/test_cli/test_lint_staged_stdin_13
-rw-r--r--gitlint/tests/expected/test_cli/test_lint_staged_stdin_272
11 files changed, 343 insertions, 0 deletions
diff --git a/gitlint/tests/expected/test_cli/test_contrib_1 b/gitlint/tests/expected/test_cli/test_contrib_1
new file mode 100644
index 0000000..ea5d353
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_contrib_1
@@ -0,0 +1,3 @@
+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: "Test tïtle"
+1: CT1 Title does not follow ConventionalCommits.org format 'type(optional-scope): description': "Test tïtle"
diff --git a/gitlint/tests/expected/test_cli/test_debug_1 b/gitlint/tests/expected/test_cli/test_debug_1
new file mode 100644
index 0000000..612f78e
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_debug_1
@@ -0,0 +1,102 @@
+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.cli Git version: git version 1.2.3
+DEBUG: gitlint.cli Gitlint version: {gitlint_version}
+DEBUG: gitlint.cli GITLINT_USE_SH_LIB: {GITLINT_USE_SH_LIB}
+DEBUG: gitlint.cli Configuration
+config-path: {config_path}
+[GENERAL]
+extra-path: None
+contrib: []
+ignore: title-trailing-whitespace,B2
+ignore-merge-commits: False
+ignore-fixup-commits: True
+ignore-squash-commits: True
+ignore-revert-commits: True
+ignore-stdin: False
+staged: False
+verbosity: 1
+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
+ T6: title-leading-whitespace
+ T3: title-trailing-punctuation
+ T4: title-hard-tab
+ T5: title-must-not-contain-word
+ words=WIP,bögus
+ T7: title-match-regex
+ regex=.*
+ 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=
+ 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.cli Linting 3 commit(s)
+DEBUG: gitlint.lint Linting commit 6f29bf81a8322a04071bb794666e48c443a90360
+DEBUG: gitlint.lint Commit Object
+--- Commit Message ----
+commït-title1
+
+commït-body1
+--- Meta info ---------
+Author: test åuthor1 <test-email1@föo.com>
+Date: 2016-12-03 15:28:15 +0100
+is-merge-commit: False
+is-fixup-commit: False
+is-squash-commit: False
+is-revert-commit: False
+Branches: ['commit-1-branch-1', 'commit-1-branch-2']
+Changed Files: ['commit-1/file-1', 'commit-1/file-2']
+-----------------------
+DEBUG: gitlint.lint Linting commit 25053ccec5e28e1bb8f7551fdbb5ab213ada2401
+DEBUG: gitlint.lint Commit Object
+--- Commit Message ----
+commït-title2.
+
+commït-body2
+--- Meta info ---------
+Author: test åuthor2 <test-email2@föo.com>
+Date: 2016-12-04 15:28:15 +0100
+is-merge-commit: False
+is-fixup-commit: False
+is-squash-commit: False
+is-revert-commit: False
+Branches: ['commit-2-branch-1', 'commit-2-branch-2']
+Changed Files: ['commit-2/file-1', 'commit-2/file-2']
+-----------------------
+DEBUG: gitlint.lint Linting commit 4da2656b0dadc76c7ee3fd0243a96cb64007f125
+DEBUG: gitlint.lint Commit Object
+--- Commit Message ----
+föo
+bar
+--- Meta info ---------
+Author: test åuthor3 <test-email3@föo.com>
+Date: 2016-12-05 15:28:15 +0100
+is-merge-commit: False
+is-fixup-commit: False
+is-squash-commit: False
+is-revert-commit: False
+Branches: ['commit-3-branch-1', 'commit-3-branch-2']
+Changed Files: ['commit-3/file-1', 'commit-3/file-2']
+-----------------------
+DEBUG: gitlint.cli Exit Code = 6 \ No newline at end of file
diff --git a/gitlint/tests/expected/test_cli/test_input_stream_1 b/gitlint/tests/expected/test_cli/test_input_stream_1
new file mode 100644
index 0000000..4326729
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_input_stream_1
@@ -0,0 +1,3 @@
+1: T2 Title has trailing whitespace: "WIP: tïtle "
+1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: tïtle "
+3: B6 Body message is missing
diff --git a/gitlint/tests/expected/test_cli/test_input_stream_debug_1 b/gitlint/tests/expected/test_cli/test_input_stream_debug_1
new file mode 100644
index 0000000..4326729
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_input_stream_debug_1
@@ -0,0 +1,3 @@
+1: T2 Title has trailing whitespace: "WIP: tïtle "
+1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: tïtle "
+3: B6 Body message is missing
diff --git a/gitlint/tests/expected/test_cli/test_input_stream_debug_2 b/gitlint/tests/expected/test_cli/test_input_stream_debug_2
new file mode 100644
index 0000000..a9028e1
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_input_stream_debug_2
@@ -0,0 +1,71 @@
+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.cli Git version: git version 1.2.3
+DEBUG: gitlint.cli Gitlint version: {gitlint_version}
+DEBUG: gitlint.cli GITLINT_USE_SH_LIB: {GITLINT_USE_SH_LIB}
+DEBUG: gitlint.cli Configuration
+config-path: None
+[GENERAL]
+extra-path: None
+contrib: []
+ignore:
+ignore-merge-commits: True
+ignore-fixup-commits: True
+ignore-squash-commits: True
+ignore-revert-commits: True
+ignore-stdin: False
+staged: False
+verbosity: 3
+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=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=.*
+ 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=
+ M1: author-valid-email
+ regex=[^@ ]+@[^@ ]+\.[^@ ]+
+
+DEBUG: gitlint.cli Stdin data: 'WIP: tïtle
+'
+DEBUG: gitlint.cli Stdin detected and not ignored. Using as input.
+DEBUG: gitlint.cli Linting 1 commit(s)
+DEBUG: gitlint.lint Linting commit [SHA UNKNOWN]
+DEBUG: gitlint.lint Commit Object
+--- Commit Message ----
+WIP: tïtle
+--- Meta info ---------
+Author: None <None>
+Date: None
+is-merge-commit: False
+is-fixup-commit: False
+is-squash-commit: False
+is-revert-commit: False
+Branches: []
+Changed Files: []
+-----------------------
+DEBUG: gitlint.cli Exit Code = 3 \ No newline at end of file
diff --git a/gitlint/tests/expected/test_cli/test_lint_multiple_commits_1 b/gitlint/tests/expected/test_cli/test_lint_multiple_commits_1
new file mode 100644
index 0000000..be3288b
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_lint_multiple_commits_1
@@ -0,0 +1,8 @@
+Commit 6f29bf81a8:
+3: B5 Body message is too short (12<20): "commït-body1"
+
+Commit 25053ccec5:
+3: B5 Body message is too short (12<20): "commït-body2"
+
+Commit 4da2656b0d:
+3: B5 Body message is too short (12<20): "commït-body3"
diff --git a/gitlint/tests/expected/test_cli/test_lint_multiple_commits_config_1 b/gitlint/tests/expected/test_cli/test_lint_multiple_commits_config_1
new file mode 100644
index 0000000..1bf0503
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_lint_multiple_commits_config_1
@@ -0,0 +1,6 @@
+Commit 6f29bf81a8:
+3: B5 Body message is too short (12<20): "commït-body1"
+
+Commit 4da2656b0d:
+1: T3 Title has trailing punctuation (.): "commït-title3."
+3: B5 Body message is too short (12<20): "commït-body3"
diff --git a/gitlint/tests/expected/test_cli/test_lint_staged_msg_filename_1 b/gitlint/tests/expected/test_cli/test_lint_staged_msg_filename_1
new file mode 100644
index 0000000..9a9091b
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_lint_staged_msg_filename_1
@@ -0,0 +1,2 @@
+1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: msg-filename tïtle"
+3: B6 Body message is missing
diff --git a/gitlint/tests/expected/test_cli/test_lint_staged_msg_filename_2 b/gitlint/tests/expected/test_cli/test_lint_staged_msg_filename_2
new file mode 100644
index 0000000..3e5dcb6
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_lint_staged_msg_filename_2
@@ -0,0 +1,70 @@
+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.cli Git version: git version 1.2.3
+DEBUG: gitlint.cli Gitlint version: {gitlint_version}
+DEBUG: gitlint.cli GITLINT_USE_SH_LIB: {GITLINT_USE_SH_LIB}
+DEBUG: gitlint.cli Configuration
+config-path: None
+[GENERAL]
+extra-path: None
+contrib: []
+ignore:
+ignore-merge-commits: True
+ignore-fixup-commits: True
+ignore-squash-commits: True
+ignore-revert-commits: True
+ignore-stdin: False
+staged: True
+verbosity: 3
+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=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=.*
+ 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=
+ M1: author-valid-email
+ regex=[^@ ]+@[^@ ]+\.[^@ ]+
+
+DEBUG: gitlint.cli Fetching additional meta-data from staged commit
+DEBUG: gitlint.cli Using --msg-filename.
+DEBUG: gitlint.cli Linting 1 commit(s)
+DEBUG: gitlint.lint Linting commit [SHA UNKNOWN]
+DEBUG: gitlint.lint Commit Object
+--- Commit Message ----
+WIP: msg-filename tïtle
+--- Meta info ---------
+Author: föo user <föo@bar.com>
+Date: 2020-02-19 12:18:46 +0100
+is-merge-commit: False
+is-fixup-commit: False
+is-squash-commit: False
+is-revert-commit: False
+Branches: ['my-branch']
+Changed Files: ['commit-1/file-1', 'commit-1/file-2']
+-----------------------
+DEBUG: gitlint.cli Exit Code = 2 \ No newline at end of file
diff --git a/gitlint/tests/expected/test_cli/test_lint_staged_stdin_1 b/gitlint/tests/expected/test_cli/test_lint_staged_stdin_1
new file mode 100644
index 0000000..4326729
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_lint_staged_stdin_1
@@ -0,0 +1,3 @@
+1: T2 Title has trailing whitespace: "WIP: tïtle "
+1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: tïtle "
+3: B6 Body message is missing
diff --git a/gitlint/tests/expected/test_cli/test_lint_staged_stdin_2 b/gitlint/tests/expected/test_cli/test_lint_staged_stdin_2
new file mode 100644
index 0000000..03fd8c3
--- /dev/null
+++ b/gitlint/tests/expected/test_cli/test_lint_staged_stdin_2
@@ -0,0 +1,72 @@
+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.cli Git version: git version 1.2.3
+DEBUG: gitlint.cli Gitlint version: {gitlint_version}
+DEBUG: gitlint.cli GITLINT_USE_SH_LIB: {GITLINT_USE_SH_LIB}
+DEBUG: gitlint.cli Configuration
+config-path: None
+[GENERAL]
+extra-path: None
+contrib: []
+ignore:
+ignore-merge-commits: True
+ignore-fixup-commits: True
+ignore-squash-commits: True
+ignore-revert-commits: True
+ignore-stdin: False
+staged: True
+verbosity: 3
+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=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=.*
+ 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=
+ M1: author-valid-email
+ regex=[^@ ]+@[^@ ]+\.[^@ ]+
+
+DEBUG: gitlint.cli Fetching additional meta-data from staged commit
+DEBUG: gitlint.cli Stdin data: 'WIP: tïtle
+'
+DEBUG: gitlint.cli Stdin detected and not ignored. Using as input.
+DEBUG: gitlint.cli Linting 1 commit(s)
+DEBUG: gitlint.lint Linting commit [SHA UNKNOWN]
+DEBUG: gitlint.lint Commit Object
+--- Commit Message ----
+WIP: tïtle
+--- Meta info ---------
+Author: föo user <föo@bar.com>
+Date: 2020-02-19 12:18:46 +0100
+is-merge-commit: False
+is-fixup-commit: False
+is-squash-commit: False
+is-revert-commit: False
+Branches: ['my-branch']
+Changed Files: ['commit-1/file-1', 'commit-1/file-2']
+-----------------------
+DEBUG: gitlint.cli Exit Code = 3 \ No newline at end of file