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

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

Closed
2 of 4 tasks
knocte opened this issue Feb 12, 2023 · 0 comments · Fixed by #3531
Closed
2 of 4 tasks

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

knocte opened this issue Feb 12, 2023 · 0 comments · Fixed by #3531
Labels

Comments

@knocte
Copy link
Contributor

knocte commented Feb 12, 2023

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

@knocte knocte added the bug label Feb 12, 2023
tehraninasab added a commit to tehraninasab/commitlint that referenced this issue Feb 12, 2023
tehraninasab added a commit to tehraninasab/commitlint that referenced this issue Feb 13, 2023
escapedcat pushed a commit that referenced this issue Feb 13, 2023
* test(subject-full-stop): add two tests

* fix: subject-full-stop rule bugfix

Fixes #3530
knocte added a commit to nblockchain/conventions that referenced this issue Feb 14, 2023
This rule was most of the time not working for us before,
because of an upstream bug[1] which we have now fixed [2].
Given that a recent commit[3] upgraded our version of
commitlint, we can just add integration tests now and we
are done.

[1] conventional-changelog/commitlint#3530
[2] conventional-changelog/commitlint#3531
[3] 1975174
knocte added a commit to nblockchain/conventions that referenced this issue Feb 14, 2023
This rule was most of the time not working for us before,
because of an upstream bug[1] which we have now fixed [2].
Given that a recent commit[3] upgraded our version of
commitlint, we can just add integration tests now and we
are done.

[1] conventional-changelog/commitlint#3530
[2] conventional-changelog/commitlint#3531
[3] 1975174
knocte added a commit to nblockchain/conventions that referenced this issue Feb 14, 2023
This rule was most of the time not working for us before,
because of an upstream bug[1] which we have now fixed [2].
Given that a recent commit[3] upgraded our version of
commitlint, we can just add integration tests now and we
are done.

[1] conventional-changelog/commitlint#3530
[2] conventional-changelog/commitlint#3531
[3] 1975174

Co-authored-by: Zahra TehraniNasab <zahratehraninasab@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant