conventional-changelog/commitlint

Using Periods With Start Case In Subject Fails

Open

#3 294 ouverte le 8 août 2022

Voir sur GitHub
 (4 commentaires) (0 réactions) (0 assignés)TypeScript (896 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (15 497 stars)
Métriques de merge PR
 (Merge moyen 12h 56m) (52 PRs mergées en 30 j)

Description

Expected Behavior

When using the start-case option in the config for subject-case entering a message such as Feat: Add Module 1.0.0 or Fix: Remove Invalid Return Value In Core.js should pass.

Current Behavior

A problem is found in the current version not allowing for messages with periods to be added unless quoted such as Feat: Add Module "1.0.0" or Fix: Remove Invalid Return Value In "Core.js"

Affected packages

  • cli
  • core

Steps to Reproduce (for bugs)

  1. Set the commitlint.config.js as per the below snippet.
  2. In a terminal enter echo Feat: Add Module 1.0.0 | commitlint -V
  3. Observe the following error output:
⧗   input: Feat: Add Module 1.0.0
✖   subject must be start-case [subject-case]
module.exports = {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'body-case': [2, 'always', 'sentence-case'],
    'header-max-length': [2, 'always', 72],
    'subject-case': [2, 'always', 'start-case'],
    'subject-empty': [2, 'never'],
    'subject-full-stop': [2, 'never', '.'],
    'type-case': [2, 'always', 'start-case'],
    'type-empty': [2, 'never'],
    'type-enum': [
      2,
      'always',
      [
        'Feat',
        'Fix'
      ],
    ],
  },
};

Context

I'd like to be able to use start case subject messages and also be able to include semantic versioning without it failing.

Your Environment

Executable Version
commitlint --version 17.0.3
git --version 2.25.1
node --version 16.14.2

Guide contributeur