diff --git a/commitizen/cli.py b/commitizen/cli.py index e5538aeb49..1f966780cf 100644 --- a/commitizen/cli.py +++ b/commitizen/cli.py @@ -89,18 +89,18 @@ def __call__( "arguments": [ { "name": "--config", - "help": "the path of configuration file", + "help": "Specify the path of the configuration file to be used", }, - {"name": "--debug", "action": "store_true", "help": "use debug mode"}, + {"name": "--debug", "action": "store_true", "help": "Use debug mode"}, { "name": ["-n", "--name"], - "help": "use the given commitizen (default: cz_conventional_commits)", + "help": "Use the given commitizen (default: cz_conventional_commits)", }, { "name": ["-nr", "--no-raise"], "type": str, "required": False, - "help": "comma separated error codes that won't raise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen-tools.github.io/commitizen/exit_codes/", + "help": "Comma separated error codes that won't raise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen-tools.github.io/commitizen/exit_codes/", }, ], "subcommands": { @@ -109,133 +109,133 @@ def __call__( "commands": [ { "name": ["init"], - "description": "init commitizen configuration", - "help": "init commitizen configuration", + "description": "Initialize commitizen configuration", + "help": "Initialize commitizen configuration", "func": commands.Init, }, { "name": ["commit", "c"], - "description": "create new commit", - "help": "create new commit", + "description": "Create a new commit", + "help": "Create a new commit", "func": commands.Commit, "arguments": [ { "name": ["--retry"], "action": "store_true", - "help": "retry last commit", + "help": "Retry the last commit", }, { "name": ["--no-retry"], "action": "store_true", "default": False, - "help": "skip retry if retry_after_failure is set to true", + "help": "Skip retry if retry_after_failure is set to true", }, { "name": "--dry-run", "action": "store_true", - "help": "show output to stdout, no commit, no modified files", + "help": "Show output to stdout, no commit, no modified files", }, { "name": "--write-message-to-file", "type": Path, "metavar": "FILE_PATH", - "help": "write message to file before committing (can be combined with --dry-run)", + "help": "Write message to file before committing (can be combined with --dry-run)", }, { "name": ["-s", "--signoff"], "action": "store_true", - "help": "Deprecated, use 'cz commit -- -s' instead", + "help": "Deprecated, use `cz commit -- -s` instead", }, { "name": ["-a", "--all"], "action": "store_true", - "help": "Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.", + "help": "Automatically stage all tracked files that have been modified and deleted", }, { "name": ["-e", "--edit"], "action": "store_true", "default": False, - "help": "edit the commit message before committing", + "help": "Edit the commit message before committing", }, { "name": ["-l", "--message-length-limit"], "type": int, - "help": "length limit of the commit message; 0 for no limit", + "help": "Maximum length of the commit message; 0 for no limit", }, { "name": ["--"], "action": "store_true", "dest": "double_dash", - "help": "Positional arguments separator (recommended)", + "help": "Separator for positional arguments, e.g. `cz commit -- --allow-empty`", }, ], }, { "name": "ls", - "description": "show available commitizens", - "help": "show available commitizens", + "description": "Show available Commitizens", + "help": "Show available Commitizens", "func": commands.ListCz, }, { "name": "example", - "description": "show commit example", - "help": "show commit example", + "description": "Show commit example", + "help": "Show commit example", "func": commands.Example, }, { "name": "info", - "description": "show information about the cz", - "help": "show information about the cz", + "description": "Show information about the Commitizen", + "help": "Show information about the Commitizen", "func": commands.Info, }, { "name": "schema", - "description": "show commit schema", - "help": "show commit schema", + "description": "Show commit schema", + "help": "Show commit schema", "func": commands.Schema, }, { "name": "bump", - "description": "bump semantic version based on the git log", - "help": "bump semantic version based on the git log", + "description": "Bump semantic version based on the git log", + "help": "Bump semantic version based on the git log", "func": commands.Bump, "arguments": [ { "name": "--dry-run", "action": "store_true", - "help": "show output to stdout, no commit, no modified files", + "help": "Show output to stdout, no commit, no modified files", }, { "name": "--files-only", "action": "store_true", - "help": "bump version in the files from the config", + "help": "Bump version in the files from the config", }, { "name": "--local-version", "action": "store_true", - "help": "bump only the local version portion", + "help": "Bump only the local version portion", }, { "name": ["--changelog", "-ch"], "action": "store_true", "default": False, - "help": "generate the changelog for the newest version", + "help": "Generate the changelog for the newest version", }, { "name": ["--no-verify"], "action": "store_true", "default": False, - "help": "this option bypasses the pre-commit and commit-msg hooks", + "help": "Bypass the pre-commit and commit-msg hooks", }, { "name": "--yes", "action": "store_true", - "help": "accept automatically questions done", + "help": "Accept automatically questions done", }, { "name": "--tag-format", "help": ( - "the format used to tag the commit and read it, " + "The format used to tag the commit and read it, " "use it in existing projects, " "wrap around simple quotes" ), @@ -243,23 +243,23 @@ def __call__( { "name": "--bump-message", "help": ( - "template used to create the release commit, " - "useful when working with CI" + "Template for creating the release commit message, " + "useful in CI/CD pipelines" ), }, { "name": ["--prerelease", "-pr"], - "help": "choose type of prerelease", + "help": "Choose the type of prerelease", "choices": ["alpha", "beta", "rc"], }, { "name": ["--devrelease", "-d"], - "help": "specify non-negative integer for dev. release", + "help": "Specify a non-negative integer for dev. release", "type": int, }, { "name": ["--increment"], - "help": "manually specify the desired increment", + "help": "Specify a desired increment", "choices": ["MAJOR", "MINOR", "PATCH"], "type": str.upper, }, @@ -268,35 +268,34 @@ def __call__( "choices": ["linear", "exact"], "default": "linear", "help": ( - "set the method by which the new version is chosen. " - "'linear' (default) guesses the next version based on typical linear version progression, " - "such that bumping of a pre-release with lower precedence than the current pre-release " - "phase maintains the current phase of higher precedence. " + "Set the method by which the new version is chosen. " + "'linear' (default) resolves the next version by following typical linear version progression, " + "ensuring that bumping a pre-release with lower precedence than the current pre-release " + "phase keeps the current phase of higher precedence. " "'exact' applies the changes that have been specified (or determined from the commit log) " - "without interpretation, such that the increment and pre-release are always honored" + "without interpretation, ensuring that the increment and pre-release are always honored" ), }, { "name": ["--check-consistency", "-cc"], "help": ( - "check consistency among versions defined in " - "commitizen configuration and version_files" + "Check consistency among versions defined in `version_files`" ), "action": "store_true", }, { "name": ["--annotated-tag", "-at"], - "help": "create annotated tag instead of lightweight one", + "help": "Create an annotated tag instead of a lightweight one", "action": "store_true", }, { "name": ["--annotated-tag-message", "-atm"], - "help": "create annotated tag message", + "help": "Create an annotated tag message", "type": str, }, { "name": ["--gpg-sign", "-s"], - "help": "sign tag instead of lightweight one", + "help": "Sign the tag instead of a lightweight one", "default": False, "action": "store_true", }, @@ -304,46 +303,46 @@ def __call__( "name": ["--changelog-to-stdout"], "action": "store_true", "default": False, - "help": "Output changelog to the stdout", + "help": "Output the changelog to the stdout", }, { "name": ["--git-output-to-stderr"], "action": "store_true", "default": False, - "help": "Redirect git output to stderr", + "help": "Redirect Git output to stderr", }, { "name": ["--retry"], "action": "store_true", "default": False, - "help": "retry commit if it fails the 1st time", + "help": "Retry the commit after first failure", }, { "name": ["--major-version-zero"], "action": "store_true", "default": None, - "help": "keep major version at zero, even for breaking changes", + "help": "Keep the major version at zero, even for breaking changes", }, *deepcopy(tpl_arguments), { "name": "--file-name", - "help": "file name of changelog (default: 'CHANGELOG.md')", + "help": "File name of the changelog (default: 'CHANGELOG.md')", }, { "name": ["--prerelease-offset"], "type": int, "default": None, - "help": "start pre-releases with this offset", + "help": "Start pre-releases with this offset", }, { "name": ["--version-scheme"], - "help": "choose version scheme", + "help": "Choose the version scheme", "default": None, "choices": version_schemes.KNOWN_SCHEMES, }, { "name": ["--version-type"], - "help": "Deprecated, use --version-scheme instead", + "help": "Deprecated, use `--version-scheme` instead", "default": None, "choices": version_schemes.KNOWN_SCHEMES, }, @@ -351,24 +350,24 @@ def __call__( "name": "manual_version", "type": str, "nargs": "?", - "help": "bump to the given version (e.g: 1.5.3)", + "help": "Bump to the specified version (e.g: 1.5.3)", "metavar": "MANUAL_VERSION", }, { "name": ["--build-metadata"], - "help": "Add additional build-metadata to the version-number", + "help": "Add additional build-metadata to the version number", "default": None, }, { "name": ["--get-next"], "action": "store_true", - "help": "Determine the next version and write to stdout", + "help": "Output the next version to stdout", "default": False, }, { "name": ["--allow-no-commit"], "default": False, - "help": "bump version without eligible commits", + "help": "Bump the version even when there are no eligible commits", "action": "store_true", }, ], @@ -376,10 +375,10 @@ def __call__( { "name": ["changelog", "ch"], "description": ( - "generate changelog (note that it will overwrite existing file)" + "Generate changelog (note that it will overwrite existing file)" ), "help": ( - "generate changelog (note that it will overwrite existing file)" + "Generate changelog (note that it will overwrite existing file)" ), "func": commands.Changelog, "arguments": [ @@ -387,16 +386,16 @@ def __call__( "name": "--dry-run", "action": "store_true", "default": False, - "help": "show changelog to stdout", + "help": "Show the changelog to stdout", }, { "name": "--file-name", - "help": "file name of changelog (default: 'CHANGELOG.md')", + "help": "File name of the changelog (default: 'CHANGELOG.md')", }, { "name": "--unreleased-version", "help": ( - "set the value for the new version (use the tag value), " + "Set the value for the new version (use the tag value), " "instead of using unreleased" ), }, @@ -405,7 +404,7 @@ def __call__( "action": "store_true", "default": False, "help": ( - "generates changelog from last created version, " + "Generate changelog from last created version, " "useful if the changelog has been manually modified" ), }, @@ -413,13 +412,13 @@ def __call__( "name": "rev_range", "type": str, "nargs": "?", - "help": "generates changelog for the given version (e.g: 1.5.3) or version range (e.g: 1.5.3..1.7.9)", + "help": "Generate changelog for the given version (e.g: 1.5.3) or version range (e.g: 1.5.3..1.7.9)", }, { "name": "--start-rev", "default": None, "help": ( - "start rev of the changelog. " + "Start rev of the changelog. " "If not set, it will generate changelog from the start" ), }, @@ -428,20 +427,20 @@ def __call__( "action": "store_true", "default": False, "help": ( - "collect all changes from prereleases into next non-prerelease. " + "Collect all changes from prereleases into next non-prerelease. " "If not set, it will include prereleases in the changelog" ), }, { "name": ["--version-scheme"], - "help": "choose version scheme", + "help": "Choose the version scheme", "default": None, "choices": version_schemes.KNOWN_SCHEMES, }, { "name": "--export-template", "default": None, - "help": "Export the changelog template into this file instead of rendering it", + "help": "Export the changelog template to this file instead of rendering it", }, *deepcopy(tpl_arguments), { @@ -452,14 +451,14 @@ def __call__( }, { "name": ["check"], - "description": "validates that a commit message matches the commitizen schema", - "help": "validates that a commit message matches the commitizen schema", + "description": "Validates that a commit message matches the commitizen schema", + "help": "Validates that a commit message matches the commitizen schema", "func": commands.Check, "arguments": [ { "name": "--commit-msg-file", "help": ( - "ask for the name of the temporal file that contains " + "Ask for the name of the temporal file that contains " "the commit message. " "Using it in a git hook script: MSG_FILE=$1" ), @@ -467,75 +466,73 @@ def __call__( }, { "name": "--rev-range", - "help": "a range of git rev to check. e.g, master..HEAD", + "help": "A range of git rev to check. e.g, master..HEAD", "exclusive_group": "group1", }, { "name": ["-d", "--use-default-range"], "action": "store_true", "default": False, - "help": "check from the default branch to HEAD. e.g, refs/remotes/origin/master..HEAD", + "help": "Validate all the commits on the default branch up to HEAD, e.g., refs/remotes/origin/master..HEAD", "exclusive_group": "group1", }, { "name": ["-m", "--message"], - "help": "commit message that needs to be checked", + "help": "Only validate the given commit message", "exclusive_group": "group1", }, { "name": ["--allow-abort"], "action": "store_true", "default": False, - "help": "allow empty commit messages, which typically abort a commit", + "help": "Allow empty commit messages, which typically abort a commit", }, { "name": ["--allowed-prefixes"], "nargs": "*", - "help": "allowed commit message prefixes. " - "If the message starts by one of these prefixes, " - "the message won't be checked against the regex", + "help": "Ignore commit messages that start with one of these prefixes", }, { "name": ["-l", "--message-length-limit"], "type": int, - "help": "length limit of the commit message; 0 for no limit", + "help": "Maximum length of the commit message; 0 for no limit", }, ], }, { "name": ["version"], "description": ( - "get the version of the installed commitizen or the current project" + "Get the version of the installed commitizen or the current project" " (default: installed commitizen)" ), "help": ( - "get the version of the installed commitizen or the current project" + "Get the version of the installed commitizen or the current project" " (default: installed commitizen)" ), "func": commands.Version, "arguments": [ { "name": ["-r", "--report"], - "help": "get system information for reporting bugs", + "help": "Output system information for reporting bugs", "action": "store_true", "exclusive_group": "group1", }, { "name": ["-p", "--project"], - "help": "get the version of the current project", + "help": "Output the version of the current project", "action": "store_true", "exclusive_group": "group1", }, { "name": ["-c", "--commitizen"], - "help": "get the version of the installed commitizen", + "help": "Output the version of the installed commitizen", "action": "store_true", "exclusive_group": "group1", }, { "name": ["-v", "--verbose"], "help": ( - "get the version of both the installed commitizen " + "Output the version of both the installed commitizen " "and the current project" ), "action": "store_true", @@ -543,13 +540,13 @@ def __call__( }, { "name": ["--major"], - "help": "get just the major version. Need to be used with --project or --verbose.", + "help": "Output just the major version. Need to be used with --project or --verbose.", "action": "store_true", "exclusive_group": "group2", }, { "name": ["--minor"], - "help": "get just the minor version. Need to be used with --project or --verbose.", + "help": "Output just the minor version. Need to be used with --project or --verbose.", "action": "store_true", "exclusive_group": "group2", }, diff --git a/tests/commands/test_bump_command/test_bump_command_shows_description_when_use_help_option.txt b/tests/commands/test_bump_command/test_bump_command_shows_description_when_use_help_option.txt index 4cf8e6c91b..fd8dc2fc46 100644 --- a/tests/commands/test_bump_command/test_bump_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_bump_command/test_bump_command_shows_description_when_use_help_option.txt @@ -1,81 +1,60 @@ -usage: cz bump [-h] [--dry-run] [--files-only] [--local-version] [--changelog] - [--no-verify] [--yes] [--tag-format TAG_FORMAT] - [--bump-message BUMP_MESSAGE] [--prerelease {alpha,beta,rc}] - [--devrelease DEVRELEASE] [--increment {MAJOR,MINOR,PATCH}] - [--increment-mode {linear,exact}] [--check-consistency] - [--annotated-tag] - [--annotated-tag-message ANNOTATED_TAG_MESSAGE] [--gpg-sign] - [--changelog-to-stdout] [--git-output-to-stderr] [--retry] - [--major-version-zero] [--template TEMPLATE] [--extra EXTRA] - [--file-name FILE_NAME] [--prerelease-offset PRERELEASE_OFFSET] - [--version-scheme {pep440,semver,semver2}] - [--version-type {pep440,semver,semver2}] - [--build-metadata BUILD_METADATA] [--get-next] - [--allow-no-commit] +usage: cz bump [-h] [--dry-run] [--files-only] [--local-version] [--changelog] [--no-verify] [--yes] [--tag-format TAG_FORMAT] [--bump-message BUMP_MESSAGE] [--prerelease {alpha,beta,rc}] [--devrelease DEVRELEASE] + [--increment {MAJOR,MINOR,PATCH}] [--increment-mode {linear,exact}] [--check-consistency] [--annotated-tag] [--annotated-tag-message ANNOTATED_TAG_MESSAGE] [--gpg-sign] [--changelog-to-stdout] + [--git-output-to-stderr] [--retry] [--major-version-zero] [--template TEMPLATE] [--extra EXTRA] [--file-name FILE_NAME] [--prerelease-offset PRERELEASE_OFFSET] + [--version-scheme {pep440,semver,semver2}] [--version-type {pep440,semver,semver2}] [--build-metadata BUILD_METADATA] [--get-next] [--allow-no-commit] [MANUAL_VERSION] -bump semantic version based on the git log +Bump semantic version based on the git log positional arguments: - MANUAL_VERSION bump to the given version (e.g: 1.5.3) + MANUAL_VERSION Bump to the specified version (e.g: 1.5.3) options: -h, --help show this help message and exit - --dry-run show output to stdout, no commit, no modified files - --files-only bump version in the files from the config - --local-version bump only the local version portion - --changelog, -ch generate the changelog for the newest version - --no-verify this option bypasses the pre-commit and commit-msg - hooks - --yes accept automatically questions done + --dry-run Show output to stdout, no commit, no modified files + --files-only Bump version in the files from the config + --local-version Bump only the local version portion + --changelog, -ch Generate the changelog for the newest version + --no-verify Bypass the pre-commit and commit-msg hooks + --yes Accept automatically questions done --tag-format TAG_FORMAT - the format used to tag the commit and read it, use it - in existing projects, wrap around simple quotes + The format used to tag the commit and read it, use it in existing projects, wrap around simple quotes --bump-message BUMP_MESSAGE - template used to create the release commit, useful - when working with CI + Template for creating the release commit message, useful in CI/CD pipelines --prerelease, -pr {alpha,beta,rc} - choose type of prerelease + Choose the type of prerelease --devrelease, -d DEVRELEASE - specify non-negative integer for dev. release + Specify a non-negative integer for dev. release --increment {MAJOR,MINOR,PATCH} - manually specify the desired increment + Specify a desired increment --increment-mode {linear,exact} - set the method by which the new version is chosen. - 'linear' (default) guesses the next version based on - typical linear version progression, such that bumping - of a pre-release with lower precedence than the - current pre-release phase maintains the current phase - of higher precedence. 'exact' applies the changes that - have been specified (or determined from the commit - log) without interpretation, such that the increment - and pre-release are always honored + Set the method by which the new version is chosen. 'linear' (default) resolves the next version by following typical linear version progression, ensuring that bumping a pre-release with lower + precedence than the current pre-release phase keeps the current phase of higher precedence. 'exact' applies the changes that have been specified (or determined from the commit log) without + interpretation, ensuring that the increment and pre-release are always honored --check-consistency, -cc - check consistency among versions defined in commitizen - configuration and version_files - --annotated-tag, -at create annotated tag instead of lightweight one + Check consistency among versions defined in `version_files` + --annotated-tag, -at Create an annotated tag instead of a lightweight one --annotated-tag-message, -atm ANNOTATED_TAG_MESSAGE - create annotated tag message - --gpg-sign, -s sign tag instead of lightweight one + Create an annotated tag message + --gpg-sign, -s Sign the tag instead of a lightweight one --changelog-to-stdout - Output changelog to the stdout + Output the changelog to the stdout --git-output-to-stderr - Redirect git output to stderr - --retry retry commit if it fails the 1st time - --major-version-zero keep major version at zero, even for breaking changes + Redirect Git output to stderr + --retry Retry the commit after first failure + --major-version-zero Keep the major version at zero, even for breaking changes --template, -t TEMPLATE - changelog template file name (relative to the current - working directory) + changelog template file name (relative to the current working directory) --extra, -e EXTRA a changelog extra variable (in the form 'key=value') --file-name FILE_NAME - file name of changelog (default: 'CHANGELOG.md') + File name of the changelog (default: 'CHANGELOG.md') --prerelease-offset PRERELEASE_OFFSET - start pre-releases with this offset + Start pre-releases with this offset --version-scheme {pep440,semver,semver2} - choose version scheme + Choose the version scheme --version-type {pep440,semver,semver2} - Deprecated, use --version-scheme instead + Deprecated, use `--version-scheme` instead --build-metadata BUILD_METADATA - Add additional build-metadata to the version-number - --get-next Determine the next version and write to stdout - --allow-no-commit bump version without eligible commits + Add additional build-metadata to the version number + --get-next Output the next version to stdout + --allow-no-commit Bump the version even when there are no eligible commits diff --git a/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt b/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt index 91b7f389b5..db3123b971 100644 --- a/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt @@ -1,41 +1,29 @@ -usage: cz changelog [-h] [--dry-run] [--file-name FILE_NAME] - [--unreleased-version UNRELEASED_VERSION] [--incremental] - [--start-rev START_REV] [--merge-prerelease] - [--version-scheme {pep440,semver,semver2}] - [--export-template EXPORT_TEMPLATE] [--template TEMPLATE] - [--extra EXTRA] [--tag-format TAG_FORMAT] +usage: cz changelog [-h] [--dry-run] [--file-name FILE_NAME] [--unreleased-version UNRELEASED_VERSION] [--incremental] [--start-rev START_REV] [--merge-prerelease] [--version-scheme {pep440,semver,semver2}] + [--export-template EXPORT_TEMPLATE] [--template TEMPLATE] [--extra EXTRA] [--tag-format TAG_FORMAT] [rev_range] -generate changelog (note that it will overwrite existing file) +Generate changelog (note that it will overwrite existing file) positional arguments: - rev_range generates changelog for the given version (e.g: 1.5.3) - or version range (e.g: 1.5.3..1.7.9) + rev_range Generate changelog for the given version (e.g: 1.5.3) or version range (e.g: 1.5.3..1.7.9) options: -h, --help show this help message and exit - --dry-run show changelog to stdout + --dry-run Show the changelog to stdout --file-name FILE_NAME - file name of changelog (default: 'CHANGELOG.md') + File name of the changelog (default: 'CHANGELOG.md') --unreleased-version UNRELEASED_VERSION - set the value for the new version (use the tag value), - instead of using unreleased - --incremental generates changelog from last created version, useful - if the changelog has been manually modified + Set the value for the new version (use the tag value), instead of using unreleased + --incremental Generate changelog from last created version, useful if the changelog has been manually modified --start-rev START_REV - start rev of the changelog. If not set, it will - generate changelog from the start - --merge-prerelease collect all changes from prereleases into next non- - prerelease. If not set, it will include prereleases in - the changelog + Start rev of the changelog. If not set, it will generate changelog from the start + --merge-prerelease Collect all changes from prereleases into next non-prerelease. If not set, it will include prereleases in the changelog --version-scheme {pep440,semver,semver2} - choose version scheme + Choose the version scheme --export-template EXPORT_TEMPLATE - Export the changelog template into this file instead - of rendering it + Export the changelog template to this file instead of rendering it --template, -t TEMPLATE - changelog template file name (relative to the current - working directory) + changelog template file name (relative to the current working directory) --extra, -e EXTRA a changelog extra variable (in the form 'key=value') --tag-format TAG_FORMAT The format of the tag, wrap around simple quotes diff --git a/tests/commands/test_check_command/test_check_command_shows_description_when_use_help_option.txt b/tests/commands/test_check_command/test_check_command_shows_description_when_use_help_option.txt index 4066748557..ae5acdfbfc 100644 --- a/tests/commands/test_check_command/test_check_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_check_command/test_check_command_shows_description_when_use_help_option.txt @@ -1,28 +1,19 @@ -usage: cz check [-h] [--commit-msg-file COMMIT_MSG_FILE | - --rev-range REV_RANGE | -d | -m MESSAGE] [--allow-abort] - [--allowed-prefixes [ALLOWED_PREFIXES ...]] - [-l MESSAGE_LENGTH_LIMIT] +usage: cz check [-h] [--commit-msg-file COMMIT_MSG_FILE | --rev-range REV_RANGE | -d | -m MESSAGE] [--allow-abort] [--allowed-prefixes [ALLOWED_PREFIXES ...]] [-l MESSAGE_LENGTH_LIMIT] -validates that a commit message matches the commitizen schema +Validates that a commit message matches the commitizen schema options: -h, --help show this help message and exit --commit-msg-file COMMIT_MSG_FILE - ask for the name of the temporal file that contains - the commit message. Using it in a git hook script: - MSG_FILE=$1 + Ask for the name of the temporal file that contains the commit message. Using it in a git hook script: MSG_FILE=$1 --rev-range REV_RANGE - a range of git rev to check. e.g, master..HEAD + A range of git rev to check. e.g, master..HEAD -d, --use-default-range - check from the default branch to HEAD. e.g, - refs/remotes/origin/master..HEAD + Validate all the commits on the default branch up to HEAD, e.g., refs/remotes/origin/master..HEAD -m, --message MESSAGE - commit message that needs to be checked - --allow-abort allow empty commit messages, which typically abort a - commit + Only validate the given commit message + --allow-abort Allow empty commit messages, which typically abort a commit --allowed-prefixes [ALLOWED_PREFIXES ...] - allowed commit message prefixes. If the message starts - by one of these prefixes, the message won't be checked - against the regex + Ignore commit messages that start with one of these prefixes -l, --message-length-limit MESSAGE_LENGTH_LIMIT - length limit of the commit message; 0 for no limit + Maximum length of the commit message; 0 for no limit diff --git a/tests/commands/test_commit_command/test_commit_command_shows_description_when_use_help_option.txt b/tests/commands/test_commit_command/test_commit_command_shows_description_when_use_help_option.txt index ba531042aa..e3c1dacab6 100644 --- a/tests/commands/test_commit_command/test_commit_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_commit_command/test_commit_command_shows_description_when_use_help_option.txt @@ -1,22 +1,17 @@ -usage: cz commit [-h] [--retry] [--no-retry] [--dry-run] - [--write-message-to-file FILE_PATH] [-s] [-a] [-e] - [-l MESSAGE_LENGTH_LIMIT] [--] +usage: cz commit [-h] [--retry] [--no-retry] [--dry-run] [--write-message-to-file FILE_PATH] [-s] [-a] [-e] [-l MESSAGE_LENGTH_LIMIT] [--] -create new commit +Create a new commit options: -h, --help show this help message and exit - --retry retry last commit - --no-retry skip retry if retry_after_failure is set to true - --dry-run show output to stdout, no commit, no modified files + --retry Retry the last commit + --no-retry Skip retry if retry_after_failure is set to true + --dry-run Show output to stdout, no commit, no modified files --write-message-to-file FILE_PATH - write message to file before committing (can be - combined with --dry-run) - -s, --signoff Deprecated, use 'cz commit -- -s' instead - -a, --all Tell the command to automatically stage files that - have been modified and deleted, but new files you have - not told Git about are not affected. - -e, --edit edit the commit message before committing + Write message to file before committing (can be combined with --dry-run) + -s, --signoff Deprecated, use `cz commit -- -s` instead + -a, --all Automatically stage all tracked files that have been modified and deleted + -e, --edit Edit the commit message before committing -l, --message-length-limit MESSAGE_LENGTH_LIMIT - length limit of the commit message; 0 for no limit - -- Positional arguments separator (recommended) + Maximum length of the commit message; 0 for no limit + -- Separator for positional arguments, e.g. `cz commit -- --allow-empty` diff --git a/tests/commands/test_example_command/test_example_command_shows_description_when_use_help_option.txt b/tests/commands/test_example_command/test_example_command_shows_description_when_use_help_option.txt index b9bf7f84fc..8a0f1c9d94 100644 --- a/tests/commands/test_example_command/test_example_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_example_command/test_example_command_shows_description_when_use_help_option.txt @@ -1,6 +1,6 @@ usage: cz example [-h] -show commit example +Show commit example options: -h, --help show this help message and exit diff --git a/tests/commands/test_info_command/test_info_command_shows_description_when_use_help_option.txt b/tests/commands/test_info_command/test_info_command_shows_description_when_use_help_option.txt index 99b1ba8a4a..3a9704aae4 100644 --- a/tests/commands/test_info_command/test_info_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_info_command/test_info_command_shows_description_when_use_help_option.txt @@ -1,6 +1,6 @@ usage: cz info [-h] -show information about the cz +Show information about the Commitizen options: -h, --help show this help message and exit diff --git a/tests/commands/test_init_command/test_init_command_shows_description_when_use_help_option.txt b/tests/commands/test_init_command/test_init_command_shows_description_when_use_help_option.txt index 0f72042f88..546ab51cb3 100644 --- a/tests/commands/test_init_command/test_init_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_init_command/test_init_command_shows_description_when_use_help_option.txt @@ -1,6 +1,6 @@ usage: cz init [-h] -init commitizen configuration +Initialize commitizen configuration options: -h, --help show this help message and exit diff --git a/tests/commands/test_ls_command/test_ls_command_shows_description_when_use_help_option.txt b/tests/commands/test_ls_command/test_ls_command_shows_description_when_use_help_option.txt index 5fa8fe1f79..253da1722c 100644 --- a/tests/commands/test_ls_command/test_ls_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_ls_command/test_ls_command_shows_description_when_use_help_option.txt @@ -1,6 +1,6 @@ usage: cz ls [-h] -show available commitizens +Show available Commitizens options: -h, --help show this help message and exit diff --git a/tests/commands/test_schema_command/test_schema_command_shows_description_when_use_help_option.txt b/tests/commands/test_schema_command/test_schema_command_shows_description_when_use_help_option.txt index 6666db4d41..dd05ead81b 100644 --- a/tests/commands/test_schema_command/test_schema_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_schema_command/test_schema_command_shows_description_when_use_help_option.txt @@ -1,6 +1,6 @@ usage: cz schema [-h] -show commit schema +Show commit schema options: -h, --help show this help message and exit diff --git a/tests/commands/test_version_command/test_version_command_shows_description_when_use_help_option.txt b/tests/commands/test_version_command/test_version_command_shows_description_when_use_help_option.txt index a194615a98..47f9b9e4a2 100644 --- a/tests/commands/test_version_command/test_version_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_version_command/test_version_command_shows_description_when_use_help_option.txt @@ -1,16 +1,16 @@ usage: cz version [-h] [-r | -p | -c | -v] [--major | --minor] -get the version of the installed commitizen or the current project (default: +Get the version of the installed commitizen or the current project (default: installed commitizen) options: -h, --help show this help message and exit - -r, --report get system information for reporting bugs - -p, --project get the version of the current project - -c, --commitizen get the version of the installed commitizen - -v, --verbose get the version of both the installed commitizen and the - current project - --major get just the major version. Need to be used with --project - or --verbose. - --minor get just the minor version. Need to be used with --project - or --verbose. + -r, --report Output system information for reporting bugs + -p, --project Output the version of the current project + -c, --commitizen Output the version of the installed commitizen + -v, --verbose Output the version of both the installed commitizen and + the current project + --major Output just the major version. Need to be used with + --project or --verbose. + --minor Output just the minor version. Need to be used with + --project or --verbose.