- Notifications
You must be signed in to change notification settings - Fork47
Description
I constantly find myself running into problems with the currentsubject_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 width57 char | fix: Show full line when patch span is points to line end55 char | test: Add test for suggestion span equaling EOL and EOF53 char | test: Improve clarity of sugg span bigger that sourcePart of the problem stems from the terminology ofannotate-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% ofLint Commit jobs still fail.
To improve the contribution experience, I would like to raise thesubject_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
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))'