Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subject-case rule shows wrong error message #192

Closed
vladshcherbin opened this issue Dec 8, 2017 · 2 comments
Closed

Subject-case rule shows wrong error message #192

vladshcherbin opened this issue Dec 8, 2017 · 2 comments

Comments

@vladshcherbin
Copy link

Expected Behavior

I set rule 'subject-case': [2, 'always', 'sentence-case']. With title fix item I expect to see error message: subject must be sentence-case [subject-case].

Current Behavior

I set rule 'subject-case': [2, 'always', 'sentence-case']. With title fix item I see error message: subject must not be sentence-case [subject-case].

Screen shot

screen shot 2017-12-08 at 08 36 48

Steps to Reproduce (for bugs)

  1. Create config files listed below.
  2. Add commit with header: fix item.
  3. See error message with title subject must not be sentence-case [subject-case].
.commitlintrc.js
module.exports = {
  parserPreset: './.commitlint-preset',
  rules: {
    'subject-case': [2, 'always', 'sentence-case']
  }
}
.commitlint-preset.js
module.exports = {
  parserOpts: {
    headerPattern: /^(.*)$/,
    headerCorrespondence: ['subject']
  }
}

Your Environment

I'm using Tower app to work with git. It uses system git binary. Commitlint is executed using husky and commitmsg script.

Executable Version
commitlint --version 5.2.3
git --version 2.13.6 (Apple Git-96)
node --version 8.9.2
@marionebl
Copy link
Contributor

Thanks for reporting this! This sounds like a bug with @commitlint/core.

@marionebl
Copy link
Contributor

Fixed with release v5.2.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants