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

Does not validate when using standard-version #198

Closed
1 of 4 tasks
satazor opened this issue Dec 13, 2017 · 5 comments
Closed
1 of 4 tasks

Does not validate when using standard-version #198

satazor opened this issue Dec 13, 2017 · 5 comments

Comments

@satazor
Copy link
Contributor

satazor commented Dec 13, 2017

Expected Behavior

⧗ input: chore(release): 1.0.0
✔ found 0 problems, 0 warnings

Current Behavior

⧗ input: chore(release): 1.0.0
✖ subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]

Affected packages

  • cli
  • core
  • prompt
  • config-conventional

Possible Solution

This seems a regression on the recent changes of the sentence case.

Steps to Reproduce (for bugs)

Simply use the above commit message above to reproduce.

commitlint.config.js ```js module.exports = { "extends": [ "@commitlint/config-conventional" ] } ```

Your Environment

Executable Version
commitlint --version 5.2.3
git --version 2.10.1
node --version 8.9.1
@satazor
Copy link
Contributor Author

satazor commented Dec 20, 2017

After investigating, here's what I found:

conventional-preset says that never of the following must "pass": ['sentence-case', 'start-case', 'pascal-case', 'upper-case']. If we consider 1.0.0 as the subject input:

  • sentence-case: 1.0.0
  • start-case: 1 0 0
  • pascal-case: 100
  • upper-case: 1.0.0

Basically sentence-case and upper-case are causing the error when input is x.x.x. How do you suggest to fix it @marionebl?

@marionebl
Copy link
Contributor

I think we can fix this by adding chore: vx.x.x and chore(y): vx.x.x to the is-ignored wildcards here:

https://github.com/marionebl/commitlint/blob/ca74470ef84a26da982321e23f4f9b92a90a51e7/%40commitlint/core/src/library/is-ignored.js#L3-L17

@satazor
Copy link
Contributor Author

satazor commented Dec 20, 2017

@marionebl I see, any reason you are using .match instead of /regexp/.test in that file?

@satazor
Copy link
Contributor Author

satazor commented Dec 20, 2017

@marionebl
Copy link
Contributor

Fix released via v5.2.6

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

No branches or pull requests

2 participants