Skip to content

P0011 filler-phrases

Rule: Docs and comments use no filler phrases.

Code P0011 (stable, never reused)
Id filler-phrases
Category prose
Source spirit_level
Fix by hand

Level per tier

Tier Level Reason
small off
small-workspace off
medium off
big off
ai deny filler adds words and no meaning
embedded off
ui off
egui off
units-strict off
units-paranoid off

Parameters

Name Type Default Meaning
phrases list of strings ["note that", "it is worth", "it's worth", "it should be noted", "it is important to note", "needless to say", "as mentioned", "as noted above", "in order to", "basically", "essentially", "obviously", "of course", "at the end of the day", "keep in mind that", "please note"] the banned phrases, matched as whole words, case-insensitive
files list of strings ["**/*.md"] globs of the Markdown files checked, relative to the root
skip list of strings [] globs of Markdown files left out
comments boolean true also check Rust comments

Why

Filler makes the reader work for nothing: "note that", "it is worth", "in order to" add words and no meaning. Text written by agents carries them by habit. The list is a parameter, so a project bans its own.

Phrases match as whole words, case-insensitive, in the Markdown files of files and in Rust comments. Text in code spans, fenced code, double quotes and link targets is a mention, not a use, and never matches.

// Note that the cache is cleared in order to free memory.   <- two findings
// The cache is cleared to free memory.                      <- passes

How to fix

Delete the phrase; the sentence says the same without it.

Configure

[lints.filler-phrases]
level = "deny"
phrases = ["note that", "it is worth", "it's worth", "it should be noted", "it is important to note", "needless to say", "as mentioned", "as noted above", "in order to", "basically", "essentially", "obviously", "of course", "at the end of the day", "keep in mind that", "please note"]
files = ["**/*.md"]
skip = []
comments = true
reason = "why this project wants it at this level"

Allow one finding in the code with // spirit-level: allow(filler-phrases) <reason> (waivers); the code works there too, as in [lints.P0011].