Rule reference
Twelve rules across seven categories ship in the box, in both editions. Each one can be switched off, given a different severity and configured — per profile.
At a glance
| Rule id | Default severity | On by default |
|---|---|---|
terminology.banned-terms | Warning | Yes |
terminology.brand-capitalization | Warning | Yes |
grammar.repeated-words | Warning | Yes |
accessibility.image-alt | Warning | Yes |
accessibility.link-text | Warning | Yes |
structure.heading-hierarchy | Warning | Yes |
inclusivity.terms | Warning | Yes |
typography.spacing | Notice | Yes |
style.weasel-words | Notice | Yes |
style.passive-voice | Notice | No |
style.sentence-length | Notice | No |
readability.grade-level | Notice | No |
The four style and readability rules are matters of taste, so three of them ship off and the fourth as a notice. Turn them on when you have decided you want that argument; do not inherit it on install.
Terminology
terminology.banned-terms
The rule most sites will get the most out of, and the one that starts empty. Enter your terms one per line:
utilize => use
leverage => use
click here => a descriptive link
synergy
# lines starting with a hash are ignored
A line with => flags the term and suggests the replacement. A bare term flags it without one. Matching is case-insensitive by default, so Utilize is caught alongside utilize; set Case-sensitive if you need the distinction.
This rule applies to titles as well as body copy. A banned term in a headline is the one you most want to catch.
terminology.brand-capitalization
Canonical spellings, one per line, written exactly as they should appear. RedPen flags any other casing of the same word:
Acme Widgets
RedPen
OAuth
Include built-in technology names is on by default and adds the usual suspects — GitHub, JavaScript, macOS and friends — so you only have to enter your own.
Accessibility
accessibility.image-alt
Flags images with no alt attribute, and images whose alt text says nothing useful: image, photo, picture, or the file name repeated back. Decorative images with an explicitly empty alt="" are left alone, because that is the correct markup for them.
accessibility.link-text
Four things: link text that means nothing out of context (“click here”, “read more”, “this link”), links with no text at all, links with an empty or # href, and links whose text is a bare URL.
Structure
structure.heading-hierarchy
Headings that skip a level (H2 straight to H4), headings with no text, and the same heading text twice in one field.
| Option | Default | Notes |
|---|---|---|
| Expected top heading level | 2 | The highest level a heading in this field should use. Usually 2, since the entry title is the page’s H1. |
| Allow H1 in content | Off | A page should have exactly one H1, and it is the title. |
Typography
typography.spacing
Double spaces, a space before punctuation, and a missing space after it. This rule inspects the source rather than the flattened prose — the prose pass collapses whitespace, so checking there would find nothing.
Grammar
grammar.repeated-words
the the, and and, of of. The mistake everyone makes and nobody sees, because the eye reads the sentence it expected.
Inclusivity
inclusivity.terms
Gendered job titles with neutral equivalents, ableist metaphors, and terms the industry has already settled on replacements for. Each finding carries the suggested alternative rather than just an objection.
Like banned terms, this rule runs on titles too.
Style and readability
style.weasel-words
Hedges and intensifiers that add length without meaning: very, quite, fairly, arguably, in order to. Ships as a notice.
style.passive-voice
Off by default. Passive voice is frequently the right choice in technical writing, and a rule that objects to it everywhere is noise rather than guidance.
style.sentence-length
Off by default. One option, Maximum words per sentence, defaulting to 30. Plain-English guidance is 25–30; technical writing runs longer.
readability.grade-level
Off by default. Flesch–Kincaid grade level for the field, against a configurable Target grade level (default 12). Plain-language guidance for a general audience is 8–10; specialist writing runs higher.
Scope: sentences versus words
Sentence-scoped rules — sentence length, passive voice, grade level — only run on prose. They skip titles, labels and table cells, where the idea of a sentence does not apply.
Word-scoped rules — banned terms, brand capitalisation, inclusive language — run everywhere, titles included. A banned term in a headline is the most important catch, not the least.
Adding your own
A rule is one small class with four methods and no Craft dependencies. See Extending RedPen.