Skip to content

Review Exit codes before v5 release (if possible) #1661

@bearomorphism

Description

@bearomorphism

Description

Some questions about exit codes were raised while I was reviewing our document.

  1. The current description of NotAllowed is
`--incremental` cannot be combined with a rev_range

But now we use NotAllowed for other scenarios as well. It's a bit outdated.

  1. What is the difference among InvalidCommandArgumentError, InvalidConfigurationError, NotAllowed? I guess we need to clarify the usages.
  • One of possible solutions may like giving them better, for example UnknownCommandArgument, UnknownConfigurationFileFormat. The word "invalid" has a lot of possible interpretations and it is very likely to be misused.
  1. InvalidManualVersion sounds like a kind of InvalidCommandArgumentError
  2. We have to add docstrings to those exceptions to reduce the possibility of misuse or abuse of exceptions. It would be even better if there is a tool to update the content of docs/exit_code.md whenever there is an update in exceptions.py

https://github.com/commitizen-tools/commitizen/blob/master/commitizen/exceptions.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions