Skip to content

The subject_length for committed is too small #339

@Muscraft

Description

@Muscraft

I constantly find myself running into problems with the current subject_length of 50, which causes me to spend extra time trying to fit my commit messages within the limit. The process of cutting my commit messages down usually involves omitting words, leading to grammatically incorrect messages that are often still over the line, examples:

57 char | test: Overflow when whitespace annotated small term width
57 char | fix: Show full line when patch span is points to line end
55 char | test: Add test for suggestion span equaling EOL and EOF
53 char | test: Improve clarity of sugg span bigger that source

Part of the problem stems from the terminology of annotate-snippets. Words like suggestion, whitespace, annotate, calculate, display, etc., are all relatively long; usually, more than one is needed. All of this leads to a bad experience where even after trying to cut the commit message down, 20% of Lint Commit jobs still fail.

To improve the contribution experience, I would like to raise the subject_length to at least 60, preferably 72. Using 72 would fit the 95th percential of subject length1 for the few repos I tested:

Repo 95th% subject lengeth
rust-lang/annotate-snippets-rs 58.0
rust-lang/rust 76.0
rust-lang/cargo 70.0
Linux kernel (last three years) 76.0

Footnotes

  1. Command for getting quantiles

    git log --no-merges --pretty='%s' | python3 -c 'import statistics,sys; print(statistics.quantiles([len(l) for l in sys.stdin], n=20))'
    

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