Skip to content

fix: subject-full-stop doesn't work if type contains dot #3530

Closed
@knocte

Description

@knocte

Expected Behavior

subject-full-stop should flag commit msg as wrong.

Current Behavior

subject-full-stop considers commit msg as fine.

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Steps to Reproduce

  1. Configure commitlint with:
module.exports = {
    parserPreset: "conventional-changelog-conventionalcommits",
    rules: {
        "type-enum": [
            RuleConfigSeverity.Error,
            "always",
            ["fix", "docs", "ci.build", "ci.tests"],
        ],
        "subject-full-stop": [RuleConfigSeverity.Error, "never", "."],

  1. Commit with a msg "fix: foo", commitlint exit code is 0: good.
  2. Commit with a msg "fix: foo.", commitlint exit code is not 0: good.
  3. Commit with a msg "ci.build: foo.", commitlint exit code is 0: bug.

Context

No response

commitlint --version

17.0.0

git --version

2.34.1

node --version

12.22.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions