magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
2 min read

subject-length

A deny rule by default: it refuses a commit subject over 100 bytes.

What it catches

A commit subject over 100 bytes.

Dimension

structure: the reader has to reconstruct the order or the purpose. A finding is counted on the dimension of its rule, the cost it names to the reader.

Why

A one-line log cuts a long subject off. The cap is 100 bytes, commitlint's header-max-length and the limit this repository's commit hook applies, not git's customary 72, since a semicolon joining two clauses already runs past 72 on main. A " (#123)" a forge appends is not counted. Over the 1729 commit messages on main, 485 run past 100, but 2 of the newest 120 do: the limit arrived with the commit hook. The number is fixed in the rule; a decisions table sets the rule off, advise or deny.

Default decision

The code is PRF1011. The decision depends on the kind of text judged:

Kind Default
commit-message deny

Changing it

A decisions table sets this rule to deny, advise or off, for everything judged or for the files a glob matches. Proofread reads the table from the file its -decisions flag names:

{
  "rules": {"subject-length": "advise"},
  "paths": {"blog/**": {"subject-length": "off"}}
}

rules applies to every file. A glob in paths applies to the files it matches, and the last match wins. A rule set to off never reports.

Seeing it

A finding names the rule, its code and the decision that applies, and links here:

{"rule": "subject-length", "code": "PRF1011", "decision": "deny", "url": "https://eli.gladman.cc/magus/reference/proofread/subject-length/"}

proofread rules prints this entry with every other rule's.

See also

proofreadrulessubject-lengthdeny
Last updated (29d8b3de)
Earlier changes on this page (1)

Full history ↗ · Blame source ↗

Glossary

CI

An ordinary target you compose yourself with ctx.needs; magus does not hardcode its stages. It is the anchor magus affected ci keys off, and ci strips the rw charm. CI in full.

Run

One target executing under one magus invocation, such as magus run test web or magus affected ci. A run keeps its captured output behind an output reference. Every magus run is a run whether or not any job asked for it; see Job for how the two relate. Run in full.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.