All rules

Numbers written two ways

number-style-consistencyon by default (info)Japanese / English

Numbers written two ways in one document, such as 1,000 and 1000

Example

Flagged
We fixed three bugs, closed four issues and merged two pull requests. The release also adds 5 tests.
What chaff prints
1:93 "5" here, where the document usually writes numbers below ten like "three" (1 of 3)
Fixed
We fixed three bugs, closed four issues and merged two pull requests. The release also adds five tests.
What chaff prints
no finding
chaff.yaml used for this example
genre: blog/tech

How to fix

Match the way the rest of the document does it. If the team has decided, write it in the style guide.

Why it matters

How a document writes numbers (1,000 or 1000; 10% or 10 percent; three files or 3 files) is a choice either way. What reads badly is mixing them in one document, which makes the reader wonder whether the difference means something. chaff does not decide which is right; for digit grouping, the percent unit and counts (below ten, and ten to twelve, separately, so that a style that spells out small numbers stays consistent) it points at whichever the document uses less.

What it does not flag

Numbers inside quotation marks, sentences with a note mark or a URL, and text in another language are not counted. A number word that opens a sentence (spelt out by every style), "one", a number before a unit of measure (6 months, 3 miles) and a number that names a group (Grade 5 students, Room 12) are not counts. Grouping is checked only for large numbers with a currency sign or a word after them; a four-digit number that looks like a year, a label number (H.R. 5376, Form 1040), versions, phone numbers and hexadecimal codes such as a commit hash (2704b2d) are left out. Legal, literary and speech genres do not run this rule.

Turning it off or relaxing it

Silence this one spot (in the document)
<!-- stet: number-style-consistency — reason -->
Relax it for the team (the reason is kept as a comment in chaff.yaml)
npx chaffjs relax number-style-consistency --why "reason"
Turn it off for the team (chaff.yaml)
rules: number-style-consistency: off
Technical details
Layer
L2
Status
stable
Severity
info
Languages
Japanese and English
Suited to
blog, business, technical, docs, academic, legal, literature, speech

Levels

Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).

strictreported when the less common style is 49% of its kind or less
normalreported when the less common style is 34% of its kind or less
relaxedreported when the less common style is 20% of its kind or less

By genre

Runs by default in
technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, docs/manual, docs/faq, docs/glossary, academic/paper
Turned off by the genre in
legal/contract, legal/statute, legal/judgment, legal/patent, literature/fiction, literature/essay, literature/poetry, literature/play, speech/address, speech/transcript

Genres

Message

"{written}" here, where the document usually writes "{usual}" ({count} of {of})

The count "{written}" here, where the document usually writes counts like "{usual}" ({count} of {of})

"{written}" here, where the document usually writes large numbers like "{usual}" ({count} of {of})

The percentage "{written}" here, where the document usually writes "{usual}" ({count} of {of})

"{written}" here, where the document usually writes numbers below ten like "{usual}" ({count} of {of})

"{written}" here, where the document usually writes ten to twelve like "{usual}" ({count} of {of})

Rewrite depth (chaff fix-plan --depth): light — words and sentences; the structure and the voice stay

This page is built from the rule's definition file:packages/chaff/rules/number-style-consistency.yaml