Missing Colon or Space After Type
A common Conventional Commits mistake: forgetting the colon or the space after the type. Learn the correct separator format and how the linter catches this.
Detailed Explanation
The Colon-Space Rule
One of the most common mistakes in Conventional Commits is omitting the colon, the space after the colon, or both. The specification requires a colon immediately after the type (and optional scope/bang), followed by a single space before the description.
Invalid Examples
feat add user login
This is missing the colon entirely. Without it, the message cannot be parsed as a Conventional Commit.
feat:add user login
This has the colon but is missing the space. While some tools may still parse this, it violates the specification and the linter will flag it as an error.
Valid Format
feat: add user login
The correct format has a colon immediately after the type, followed by exactly one space.
Why This Matters
Automated tools — changelog generators, CI/CD pipelines, version bumpers — rely on parsing the : separator to extract the type and description. If the separator is missing or malformed, these tools may:
- Fail to categorize the commit
- Skip the commit in the changelog
- Produce incorrect version bumps
- Trigger CI failures if commit linting is enforced
Auto-Fix
The Conventional Commits Linter can detect when a colon is present but the space is missing, and it will suggest a corrected version. Click Copy corrected to copy the fixed message.
Related Separator Issues
- Extra spaces before colon:
feat : description— some linters reject this. - Multiple spaces after colon:
feat: description— the spec requires exactly one space. - Tab instead of space:
feat:\tdescription— use a regular space.
Use Case
This rule catches one of the most frequent formatting errors when adopting Conventional Commits. It is especially common when developers are transitioning from free-form commit messages and forget the precise separator syntax.