Skip to content

Readability.ColemanLiau's message says 'below 19' but its condition fires at 9 #1171

Description

@theredspoon

What's wrong

testdata/styles/Readability/ColemanLiau.yml's message and its actual firing condition don't agree:

message: "Try to keep the Coleman–Liau Index grade (%s) below 19."
condition: "> 9"

The rule reports once the computed grade passes 9, but tells the user to keep it below 19.

The message is very likely the bug, not the condition

Every other formula in this same style has its message threshold exactly match its condition:

Formula Message says Condition
FleschKincaid below 8 > 8
FleschReadingEase above 70 < 70
GunningFog below 10 > 10
SMOG below 10 > 10
LIX below 35 > 35
AutomatedReadability below 8 > 8
ColemanLiau below 19 > 9

ColemanLiau is the only one where they diverge. Coleman-Liau's grade output is on the same US-grade-level scale as FleschKincaid's and AutomatedReadability's, both of which use 8 as their threshold, so 9 fits the pattern the rest of the style already follows. It also matches published guidance directly: general-audience writing is commonly recommended to target a Coleman-Liau grade around 8-10, with several sources specifically citing "8 or less" for public-facing content (readable.com, readabilityformulas.com). A threshold of 19 sits past graduate/academic-level prose on this same scale and would rarely fire on real writing.

Traced the file's actual history via the GitHub API, since local shallow clones don't have it. It's been touched exactly twice since it was created: a140d309 ("feat: add Readability style", 2021-11-14), which added it fresh with these exact values, and a pure rename in 2022 with no content change. The founding commit also corrected FleschReadingEase's threshold from 50 to 70 in the same diff, confirming a deliberate tuning pass rather than a rushed first draft. That makes a simple transposed digit (9 becoming 19) in the message string a more likely explanation than a leftover placeholder value, sitting unnoticed for about four years since nothing exercises the message text in a way that would surface the mismatch.

Proposed fix

Correct the message to match the condition:

message: "Try to keep the Coleman–Liau Index grade (%s) below 9."

Not the other way around: 9 is consistent with the rest of the style's thresholds, so it's the condition that's very likely correct.

Found while researching a check[...] rollup formula for #1163, not otherwise related.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions