Skip to content

Replace commitlint with a more generic and less fragile solution #6668

Open
@sschuberth

Description

@sschuberth

Since the introduction of conventional commits and commitlint to enforce them we've faced various issues with commitlint, resulting in work-arounds like

ort/.commitlintrc.yml

Lines 5 to 11 in 2ce4322

parserOpts:
headerPattern: '^(\w*)(?:\((.*)\))?!?: (.*)$'
breakingHeaderPattern: '^(\w*)(?:\((.*)\))?!: (.*)$'
headerCorrespondence: ['type', 'scope', 'subject']
noteKeywords: ['BREAKING CHANGE', 'BREAKING-CHANGE', '\[\d+\]:', 'Signed-off-by:']
revertPattern: '/^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i'
revertCorrespondence: ['header', 'hash']

Also the configuration syntax sucks quite frankly, like in

ort/.commitlintrc.yml

Lines 13 to 15 in 727fc5b

body-leading-blank:
- 2
- always

what the heck is "2" supposed to mean? Let alone the bugs.

As conventional commit can easily be checked via regexes, I propose to instead switch to a generic tool like https://github.com/GsActions/commit-message-checker that can also be configured to check for some of our other non-conventional-commits requirements.

Opinions, @oss-review-toolkit/core-devs?

Edit: Collecting ideas for alternatives

Metadata

Metadata

Assignees

No one assigned

    Labels

    configurationAbout configuration topicsreleaseOn the topic of making releases

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions