Skip to content

Commit 691e672

Browse files
committed
docs(exit-codes): general update
1 parent cbbf615 commit 691e672

File tree

1 file changed

+38
-33
lines changed

1 file changed

+38
-33
lines changed

docs/exit_codes.md

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,44 @@
11
# Exit Codes
22

3-
Commitizen handles expected exceptions through `CommitizenException` and returns different exit codes for different situations. They could be useful if you want to ignore specific errors in your pipeline.
3+
Commitizen handles expected exceptions through `CommitizenException` and returns different exit codes for different situations.
44

5-
These exit codes can be found in `commitizen/exceptions.py::ExitCode`.
5+
The following information may come in handy if you want to ignore specific errors in your pipeline.
6+
7+
These exit codes can be found in [commitizen/exceptions.py](https://github.com/commitizen-tools/commitizen/blob/master/commitizen/exceptions.py).
68

79
| Exception | Exit Code | Description |
810
| --------------------------- | --------- | ----------------------------------------------------------------------------------------------------------- |
9-
| ExpectedExit | 0 | Expected exit |
10-
| DryRunExit | 0 | Exit due to passing `--dry-run` option |
11-
| NoCommitizenFoundException | 1 | Using a cz (e.g., `cz_jira`) that cannot be found in your system |
12-
| NotAGitProjectError | 2 | Not in a git project |
13-
| NoCommitsFoundError | 3 | No commit found |
14-
| NoVersionSpecifiedError | 4 | Version can not be found in configuration file |
15-
| NoPatternMapError | 5 | bump / changelog pattern or map can not be found in configuration file |
16-
| BumpCommitFailedError | 6 | Commit error when bumping version |
17-
| BumpTagFailedError | 7 | Tag error when bumping version |
18-
| NoAnswersError | 8 | No user response given |
19-
| CommitError | 9 | git commit error |
20-
| NoCommitBackupError | 10 | Commit back up file cannot be found |
21-
| NothingToCommitError | 11 | Nothing in staging to be committed |
22-
| CustomError | 12 | `CzException` raised |
23-
| NoCommandFoundError | 13 | No command found when running Commitizen cli (e.g., `cz --debug`) |
24-
| InvalidCommitMessageError | 14 | The commit message does not pass `cz check` |
25-
| MissingConfigError | 15 | Configuration missed for `cz_customize` |
26-
| NoRevisionError | 16 | No revision found |
27-
| CurrentVersionNotFoundError | 17 | current version cannot be found in _version_files_ |
28-
| InvalidCommandArgumentError | 18 | The argument provide to command is invalid (e.g. `cz check -commit-msg-file filename --rev-range master..`) |
29-
| InvalidConfigurationError | 19 | An error was found in the Commitizen Configuration, such as duplicates in `change_type_order` |
30-
| NotAllowed | 20 | `--incremental` cannot be combined with a `rev_range` |
31-
| NoneIncrementExit | 21 | The commits found are not eligible to be bumped |
32-
| CharacterSetDecodeError | 22 | The character encoding of the command output could not be determined |
33-
| GitCommandError | 23 | Unexpected failure while calling a git command |
34-
| InvalidManualVersion | 24 | Manually provided version is invalid |
35-
| InitFailedError | 25 | Failed to initialize pre-commit |
36-
| RunHookError | 26 | An error occurred during a hook execution |
37-
| VersionProviderUnknown | 27 | `version_provider` setting is set to an unknown version provider identifier |
38-
| VersionSchemeUnknown | 28 | `version_scheme` setting is set to an unknown version scheme identifier |
39-
| ChangelogFormatUnknown | 29 | `changelog_format` setting is set to an unknown version scheme identifier or could not be guessed |
11+
| `ExpectedExit` | 0 | Expected exit |
12+
| `DryRunExit` | 0 | Exit due to passing `--dry-run` option |
13+
| `NoCommitizenFoundException` | 1 | Using a cz (e.g., `cz_jira`) that cannot be found in your system |
14+
| `NotAGitProjectError` | 2 | Not in a git project |
15+
| `NoCommitsFoundError` | 3 | No commits found |
16+
| `NoVersionSpecifiedError` | 4 | Version is not specified in configuration file |
17+
| `NoPatternMapError` | 5 | bump / changelog pattern or map can not be found in configuration file |
18+
| `BumpCommitFailedError` | 6 | Commit failed when bumping version |
19+
| `BumpTagFailedError` | 7 | Tag failed when bumping version |
20+
| `NoAnswersError` | 8 | No user response given |
21+
| `CommitError` | 9 | git commit error |
22+
| `NoCommitBackupError` | 10 | Commit backup file is not found |
23+
| `NothingToCommitError` | 11 | Nothing in staging to be committed |
24+
| `CustomError` | 12 | `CzException` raised |
25+
| `NoCommandFoundError` | 13 | No command found when running Commitizen cli (e.g., `cz --debug`) |
26+
| `InvalidCommitMessageError` | 14 | The commit message does not pass `cz check` |
27+
| `MissingConfigError` | 15 | Configuration is missing for `cz_customize` |
28+
| `NoRevisionError` | 16 | No revision found |
29+
| `CurrentVersionNotFoundError`| 17 | current version cannot be found in _version_files_ |
30+
| `InvalidCommandArgumentError`| 18 | The argument provided to the command is invalid (e.g. `cz check -commit-msg-file filename --rev-range master..`) |
31+
| `InvalidConfigurationError` | 19 | An error was found in the Commitizen Configuration, such as duplicates in `change_type_order` |
32+
| `NotAllowed` | 20 | `--incremental` cannot be combined with a `rev_range` |
33+
| `NoneIncrementExit` | 21 | The commits found are not eligible to be bumped |
34+
| `CharacterSetDecodeError` | 22 | The character encoding of the command output could not be determined |
35+
| `GitCommandError` | 23 | Unexpected failure while calling a git command |
36+
| `InvalidManualVersion` | 24 | Manually provided version is invalid |
37+
| `InitFailedError` | 25 | Failed to initialize pre-commit |
38+
| `RunHookError` | 26 | An error occurred during a hook execution |
39+
| `VersionProviderUnknown` | 27 | Unknown `version_provider` |
40+
| `VersionSchemeUnknown` | 28 | Unknown `version_scheme` |
41+
| `ChangelogFormatUnknown` | 29 | Unknown `changelog_format` or cannot be determined by the file extension |
42+
| `ConfigFileNotFound` | 30 | The configuration file could not be found |
43+
| `ConfigFileIsEmpty` | 31 | The configuration file is empty |
44+
| `CommitMessageLengthLimitExceededError`| 32 | The commit message length exceeds the given limit. |

0 commit comments

Comments
 (0)