Validation Checks
Validation Checks
Understand every validation step performed before Custy workflows begin.
custy validateCategory
Quick Command
custy validateOverviewâ
The validate command performs a sequence of independent validation checks.
Each check verifies a specific prerequisite required by later Custy workflows.
If a validation step fails, execution stops immediately and Custy reports both the reason for the failure and a suggested action for resolving it.
Validation Categories
What Custy Checks
Git Repository
Repository Configuration
Project Resources
Repository State
Validation Sequence
Custy performs validation in the following order.
| Step | Validation |
|---|---|
| 1 | Git repository |
| 2 | Git remote |
| 3 | Version file |
| 4 | Commit message template |
| 5 | Tag message template |
| 6 | Staged changes |
| 7 | Commit validation provider preflight |
| 8 | Commit message template availability |
| 9 | Tag message template availability |
This sequence ensures that inexpensive environment checks are completed before workflow-specific validation begins.
Repository Validation
Git Repositoryâ
Custy first verifies that the current directory belongs to a Git repository.
If the directory has not been initialized with Git, validation stops because subsequent workflow commands depend on Git operations.
Git Remoteâ
Custy verifies that the configured remote exists.
The remote name is obtained from your project configuration rather than being hard-coded.
This allows projects to use names such as:
originupstreambackup- another custom remote
depending on the project's configuration.
Project Resource Validation
Version Fileâ
Custy verifies that the configured version file exists.
The exact file location depends on your project's configuration.
Typical examples include:
__version__.py- another project-specific version file
Commit Message Templateâ
Custy verifies that the configured commit message template exists.
This template is typically generated by running:
custy init
or
custy init --mode templates
Tag Message Templateâ
Custy also verifies the configured tag message template before workflows that require annotated tags or generated tag messages.
Repository State Validation
Staged Changesâ
Before commit-oriented workflows begin, Custy verifies that files have already been staged.
Depending on the selected options and project configuration, Custy may:
- accept existing staged files,
- automatically stage modified files,
- allow empty staging when explicitly requested,
- or stop validation and explain how to resolve the problem.
This validation helps prevent accidental empty commits.
Commit Validation Provider
Custy resolves tool.custy.commit.validation independently from the selected
version strategy. Auto mode uses Custy's validator unless both Commitizen
configuration and cz are available. Explicit or strict Commitizen mode fails
early when the integration is missing or invalid. Final message validation runs
after the editor step in commit-producing profiles.
See the provider behavior matrix.
Relationship to Workflows
Running
custy validate
performs these checks directly.
Running
custy run
also performs the same validation stage automatically before continuing with the remaining workflow pipeline.
In most day-to-day development, users who primarily use workflow commands do not need to execute validation separately.