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

Compliance issue with specification: optional ! is recognized as invalid (RDT-596) #12

Closed
wernerfred opened this issue Nov 30, 2023 · 1 comment · Fixed by #14
Closed
Assignees
Labels
Status: Reviewing Issue is being reviewed

Comments

@wernerfred
Copy link

wernerfred commented Nov 30, 2023

In the specification rule 1. reads as follows:

Commits MUST be prefixed with a type, which consists of a noun, feat, fix, etc., followed by the OPTIONAL scope, OPTIONAL !, and REQUIRED terminal colon and space.

When using the following (valid according to conventional commit specification) commit message: refactor!: redefine pre-commit hooks

The check will fail with an issue in the type:

Conventional Commit......................................................Failed
- hook id: conventional-precommit-linter
- exit code: 1

❌ INVALID COMMIT MESSAGE: refactor!: redefine pre-commit hooks
    _______________________________________________________________
    Commit message structure:  <type>(<optional-scope>): <summary>
                                <... empty line ...>
                                <optional body lines>
                                <optional body lines>
    _______________________________________________________________
    Commit message rules:
        ❌ <type> is mandatory, use one of the following: [build, change, chore, ci, deprecate, docs, feat, fix, import, merge, perf, refactor, remove, revert, security, style, test]
        ✔️  (<optional-scope>) if used, must be enclosed in parentheses
        ✔️  (<optional-scope>) if used, must be written in lower case without whitespace
        ✔️  <summary> must not end with a period
        ✔️  <summary> must be between 5 and 75 characters long
        ✔️  <body> lines must be no longer than 100 characters
        ✔️  <body> must be separated from the 'summary' by a blank line

Which is triggered as the ! is not recognized as a valid optional char after the type (and optional scope) but before the required terminal colon.

Can you add another function that takes care of this?
Maybe no new function is needed but splitting the the message by !: OR : (r"!?:") is sufficient

/cc @sh0shin

@github-actions github-actions bot changed the title Compliance issue with specification: optional ! is recognized as invalid Compliance issue with specification: optional ! is recognized as invalid (RDT-596) Nov 30, 2023
@kumekay kumekay self-assigned this Nov 30, 2023
kumekay added a commit that referenced this issue Dec 4, 2023
kumekay added a commit that referenced this issue Dec 4, 2023
kumekay added a commit that referenced this issue Dec 4, 2023
kumekay added a commit that referenced this issue Dec 4, 2023
@kumekay kumekay added the Status: Reviewing Issue is being reviewed label Dec 4, 2023
@kumekay
Copy link
Collaborator

kumekay commented Dec 4, 2023

Hi @wernerfred
This linter only checks for a subset of commitizen features we commonly use inside Espressif,
but I proposed the support for ! in commit types #14. It is disabled by default, however, and requires passing of the argument.

kumekay added a commit that referenced this issue Dec 14, 2023
tomassebestik pushed a commit that referenced this issue Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Reviewing Issue is being reviewed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants