Skip to content

Commit Message Quality: Two Calibration Issues (Medium Priority) #26

Description

@kenjudy

Two distinct problems:

a) Word count threshold at 10 is too strict for infrastructure commits. The RETROSPECTIVE already flagged this. Infrastructure commits tend toward noun phrases ("Add test infrastructure for statistics module") which score low on word count despite being genuinely specific. 7 words is the right threshold, as the RETROSPECTIVE suggested.

b) Conventional prefix + minimum word count not enforced together. Currently feat: a passes the quality gate because it has the conventional prefix. A commit that's feat: fix (2 words) reads as quality. Adding a minimum word count of 4 even for conventional commits would catch this without over-filtering.

Concretely:

conventional = /^(feat|fix|...)((.+))?:/i.test(message)
&& message.split(' ').length >= 4 // add this
specific = message.split(' ').length >= 7 // lower from 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions