Repository navigation
feat: lint verbs whose object is nothing or none - #233
Merged
Merged
Conversation
Add verbs_nothing, a taste lint for "the resolver finds nothing" where "the resolver does not find a provider" is meant. The pronoun hides what was not found, and the advice is to name it and negate the verb. It is off until a config adds [md.lints.verbs_nothing], or the same table under rust, cpp or toml; the table holds only message. It is a sibling of verbs_no_nouns with the object changed, and reuses that lint's sets of excuses by reference: the -s pattern, with the function words and clause verbs excused, and the forms pattern, a verb the tagger reads at Likely or above. Three things are its own. have and had are read as verbs by a literal list, since the tagger reads them as auxiliaries before the object. An object followed by to, but, of, about, like, else, more or less is an idiom or names what follows and is not flagged. A capital on the object, as in "returns None", is a name from code and the match is dropped. Its claim, which the tree test and the big-tier test re-derive: llm files hold it at least 3 times as often as human files, and at most 3.5% of the big tier's human files hold it. On the tree it holds 1 human and 23 llm files; on the big tier 19 of 10,037 human files and 518 of 7,498 llm files. The lint gets its page, its since of next, a case directory, a golden file, the allow schema, and rows in the corpus tool's shipped patterns.
Turn verbs_nothing on for this repo's Markdown, Rust and TOML, beside the two other taste lints, and fix the 107 places in 59 files it found. Each names the noun and negates the verb, or says the plain positive thing: "has none" becomes "does not have one", "bans nothing" becomes "does not ban a phrase", "writes nothing" becomes "does not write the file". The guide's step 5 changes with it, and so does the test that pins its words.
The review of the text edits found that the `none` hits had been rewritten pronoun for pronoun, "has none" to "does not have one", with the noun still unnamed. Each now names it, as the lint's page asks: "does not have a stamp", "does not add a region", "does not name a surface". One sentence stays as it was, src/output/json.rs line 29, "a run with no base has none", so the owner can see the shape of the question, and the repo's own check fails on it until that is decided. "checks nothing" had become "does not check a file", which changed the meaning; it is "does not run a check" now. `too` and `the` join the stop words, for "none too soon" and "none the wiser". The module doc says the tree claim is 3 times, as the test asserts; the allow page keeps "a dated record" and folds "spaces, tabs and line breaks" to "whitespace" to stay under its budget.
src/output/json.rs line 29, "a run with no base has none", was left as it was so the owner could see the shape of the none question. The repo's own check must pass before the change opens, so it reads "does not have a base to name" now, and the sentence stays quoted in the question as the example of good prose the none half fails.
Text merged since this branch forked from main read "has none", "gets nothing", "edits nothing" and "edits none". Name the noun and negate the verb so the repo passes verbs_nothing.
webern
force-pushed
the
m/deslag-nothing
branch
from
October 31, 2026 09:15
e9bb0de to
deea76f
Compare
The revised verbs_nothing rules flag "does nothing", "none of X", "nothing of X", and a preposition before the object at the end of a clause. They find fifteen more places in the repo's own text, all in comments and doc comments. Each one now negates the verb. Where the sentence has just named the noun, it says "does not do anything", "does not have" or "does not read them" rather than naming it again. None of the earlier edits is undone.
"does nothing", "do nothing", "did nothing" and "done nothing" are flagged. The -s pattern lets `does` past the sibling's function words, and the forms pattern reads `do`, `did` and `done` as verbs from a literal list beside `have` and `had`, with a local list of the forms of be in place of the sibling's BE_DO. The sibling's sets are unchanged. The forms of `return` are excused in both patterns: a function that returns nothing has no value to name. `of` is no longer a stop word, so "catches none of these" is flagged. `about` stays, so "knows nothing about the peer" passes. An object spelled `None` or `Nothing` after a word in lower case is a name from code, as in "returns None", and so is a capitalised object after a word in capitals, as in the SQL "DO NOTHING". Any other capital on the object no longer drops the match, so a Title Case heading such as "Why The Resolver Finds Nothing" and emphasis such as "has NONE" are flagged. One word may stand between the verb and the object: a preposition the tagger reads at Likely or above, or `to`, as in "plays with nothing". The match then counts only when the object ends the sentence or comes before a comma, past closing brackets, quotes and emphasis marks. A semicolon or a colon does not count. The -s pattern drops a word the tagger is Sure is neither a verb nor an auxiliary, as the noun in "costs the process nothing". Three fixed phrases pass: "have none of it" (or that, or this) at the end of a clause, "knows nothing of", and "did nothing wrong". The unit tests cover each rule and each exception, and the sentences of the review. The false_positives case drops "found none of them" and "does nothing" and gains the idioms, "returns nothing" and "DO NOTHING". The forms case gains "does nothing" and "plays with nothing". The lint's page describes the new rules, and the golden file is regenerated.
Many of the repo's own fixes repeated a noun that the same sentence had just named, as in "the stamp, or None when the config does not have a stamp". "does not have one" reads better there, and so does "does not print anything" for "prints nothing". The advice keeps "name it and negate the verb" first, and now offers "does not have one" or "does not do anything" second, for a noun the sentence has just named. The lint's page says the same and stays within its 800 bytes. The cases' expected output is regenerated.
No test failed with "?" taken out of the marks that end a sentence, or with the literal "to" taken out of the slot. The tagger reads "to" in "It points to nothing." as a particle, so the preposition test alone does not cover it. Add a question that the slot must flag, and a check that a "to" read as a particle still fills the slot.
…advice The advice tied "does not do anything" to a noun the sentence has just named, but "does nothing" names no noun. Offer "does not have one" for a noun just named, and the "anything" form, as in "does not do anything" or "does not print anything", where there is no noun to name. Regenerate the case outputs for the new advice. Say on SHIPPED that the verbs_nothing patterns there are counted before the lint's sentence-end and code-name checks, so they count a little more than the lint.
webern
marked this pull request as ready for review
October 31, 2026 15:13
2 tasks done
webern
added a commit
that referenced
this pull request
Oct 31, 2026
## Human Summary Describe the lints a bit better in the README.md. LLM written then re-written by me. ## Summary The README's Cool Lints section was two one-line examples and a TODO that said to sell it better. This rewrites the section. Each of the three construction lints gets its own heading: `verbs_no_nouns`, `verbs_nothing` and `not_at_all`. Each one says what the tic is, what the lint tells the LLM to do, and shows before/after pairs. The pairs are not invented. They are rewrites from this repo's own history, made when each lint was first turned on against the Rust doc comments: #147 for `verbs_no_nouns`, #193 for `not_at_all` and #233 for `verbs_nothing`. The "89 findings in 45 files" count is from the #147 description. A closing part says why these are not allow-lists: the word sets are Rust data, and each lint must hold its corpus claim (llm files trip it at least 3 times as often as human files, at most 3.5% of human files trip it), which the tests re-derive on every run. Only `README.md` changes. The README has `llm_edit: false`; the owner authorized this edit for the Cool Lints section only. ## Testing - [x] `make ci-fast`: exit 0 - [x] every before/after pair checked against the diff of the commit it came from ## References - #147, #193, #233: the source of the examples - Related: #43, the issue that named the verbs-no-nouns tic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human Summary
This lint attempts to detect and push back when the LLM writes things like:
It drives me crazy. All the complexity below has to do with trying to detect it well without false positives.
AI Summary
Adds
verbs_nothing, the taste lint of #221: a verb whose object isnothingornone, as in "the resolver finds nothing", "the scan found none" or "the cache has none", where the pronoun hides what was not found. The advice is to name it and negate the verb, "the resolver does not find a workload provider", or, where the sentence has just named the noun, to write "does not have one", or, where there is no noun to name, "does not do anything". It is off until a config adds[md.lints.verbs_nothing], or the same table under[rust],[cpp]or[toml]; the table holds onlymessage. It is a sibling ofverbs_no_nouns, not a mode of it: its ownLintsfield withsince = "next", its own page,Violation, case directory, golden file and corpus claim, so the pinnedverbs_no_nounscounts do not move.The first draft of this PR shipped a narrower lint and asked the owner four questions. The owner answered them on 2026-10-31 and decided eight changes, all of which are in this revision. The rules below are the final ones; the decisions and what each one measured follow.
The rules
Two patterns, as in the sibling, with one optional slot added.
The
-spattern is a word ending inswith no apostrophe, then the object, in one sentence. The sibling's closed sets stand in for a tagger:FUNCTION_WORDS(is,was,as,this,itsand the rest) andCLAUSE_VERBS(means,says,proves,showsand the rest) are excused, except thatdoesis let through, so "does nothing" is flagged.hasis not excused. A word the tagger isSureis neither a verb nor an auxiliary is dropped, so the plural noun in "costs the process nothing" does not match; atLikelythe guard would wrongly drop "names none" and "records nothing", so it isSureonly.The forms pattern is a word the tagger reads as a verb at
Likelyor above, or one ofhave,had,do,did,done, which the tagger reads as auxiliaries, withouts, not a present participle, and not a form of be (am,are,were,be,been) or in the sibling'sCLAUSE_FORMSorSAY. The sibling'sBE_DOis not reused, becausedoanddidare now the tic.Both patterns excuse
return,returnsandreturned: a function that returns nothing does not have a value to name.Between the verb and the object one word may stand: a preposition the tagger reads as an adposition at
Likely, orto. When it does, the match fires only if the object ends the sentence or comes before a comma, past closing brackets, closing quotes and emphasis marks. So "The cat plays with nothing." and "maps to nothing, and the threads..." are flagged; "resolves to nothing; the caller..." and "points at nothing in the cache" are not. The owner's reasoning: when more of the sentence follows, the preposition may lead somewhere the pronoun does not hide.An object followed by one of
STOP_WORDS(to,but,about,like,else,more,less,too,the) is an idiom or names what follows, as in "has nothing to do with", "knows nothing about the peer", "contains nothing but zeros", "none too soon" and "none the wiser".ofis not a stop word any more, so "catches none of these" is flagged.Three fixed phrases are excused as word sequences over the sentence's tokens:
have|has|had none of it|that|thisat the end of a clause (so "have none of that data" stays flagged),know|knows|knew|known nothing of, anddo|does|did|done nothing wrong. The corpus supports exactly these three; every other candidate idiom is already excused by a stop word, an excused verb or the adjacency rule.An object spelled exactly
NoneorNothingafter a word in lower case, as in "returns None", is a name from code, and so is a capitalised object after a word in capitals, as in the SQLINSERT ... ON CONFLICT DO NOTHING. A Title Case heading ("## Why The Resolver Finds Nothing") and emphasis ("has NONE") are flagged. Backticked code never reaches the lint.The report quotes each place, from the verb to the object, with the lint's own advice unless the config's
messagereplaces it. Anallowentry can exempt a sentence.tools/corpuslists both patterns inSHIPPED, asverbs_nothing_sandverbs_nothing_forms; those measure the raw patterns, before the sentence-end and name checks, so they count a little more than the lint does.The owner's decisions (2026-10-31)
The first draft asked four questions. The answers, and the further changes the owner asked for:
nonestays an object of the lint. The repo edits it forced are evidence for it, not against it. No anaphora excuse.haveandhadstay on a literal list, read as verbs whatever the tagger says, so "have none" is caught. The two human corpus hits this causes are acceptable.ofleaves the stop words. "knows nothing about the peer" is not:aboutstays.Sure.allowentry or backticks.What it measured
English fixtures, files that hold at least one match. The tree is
tests/corpus/at this head; the big tier isghcr.io/webern/deslag-blobs:v7@sha256:d9a3047c38e2f9e7845f15f4a4f8a66b715595879f818e4ad4cd0997077c85fb. Both rows are what the two corpus tests print on the final head.The claim in the module's doc comment, which
tests/slow/corpus.rsandmake test-blobsre-derive, is unchanged:llmfiles hold it at least 3 times as often ashumanfiles on the tree and on the big tier, and at most 3.5% of the big tier'shumanfiles hold it. The first draft measured 1 / 23 on the tree and 19 / 512 on the big tier. The human count roughly doubles, almost entirely from "does nothing" and "do nothing".What each decision does on the big tier, in files (human / llm), measured with the real lint and that one rule switched off while the others stay on. These are marginal effects and do not sum.
ofnot a stop word"does nothing" alone is 10 human and 46 llm big-tier files. "done nothing" holds 0 files on both tiers (a plain text search of the big tier finds none either); it is on the list so that "has done nothing" is caught when it appears. The preposition slot holds 0 human and 28 llm big-tier files in all; 20 of those end at a full stop and 8 only before a comma; 12 of the 28 are files nothing else flags. The prepositions:
to16,at5,with3,from3,by,in,of,ononce each. The three idioms remove 3 human files, one paragraph quoted in three repos ("the GitHub Pages server returns 404 because it knows nothing of/todos/42") that leavingofout of the stop words had let back in.The 39 human big-tier files, by what the lint quotes:
do nothingin ten,does nothingin ten,Do nothingin one; thenhave none(3),has none,have nothing,had nothing,did nothing,knew nothing,specify none,render nothing,meet none,match nothing,make none,list nothing,get nothing,find nothing,changes nothingandallow none. Among them: "InfluxDB does nothing and does not return an error", "a controller that does nothing", "If it does not exist, do nothing."Known false positives and false negatives
False positives seen on the big tier and left in, each a sentence the lint cannot tell from the tic: "accepts none, all or some" and "to read none", where
noneis a documented config value; "PRs with none" and "3+ inches of nothing", where a plural noun stands before the preposition. A docstring-style sentence that opens with the verb, "Returns None when the key is missing.", would be flagged by the code-name rule because no lower-case word precedesNone; it holds 0 corpus files.False negatives, left out on purpose: a participle before the object ("Finding nothing, the scan stops"); a prepositional match with more sentence after it ("points at nothing in the cache"); "nothing left", "nothing new" and "nothing at all" are not treated as idioms, since a noun is hidden there, and stay flagged.
Cost to this repo
The repo's config turns the lint on in
md,rustandtoml, beside the two sibling taste lints. The first draft found 107 places in 59 files of the repo's own text and fixed each by naming the noun and negating the verb. The final rules found 15 more in 14 files: 5 from "does nothing", 9 fromnone of/nothing of, and one from the comma rule ("depends on none,"). Each is fixed the way the advice says, with "does not do anything" or "does not have any of them" where the noun was just named. None of the 107 earlier edits was reverted. The 15 new edits, old to new:Cargo.toml: "depends on none," to "does not depend on one,"src/config/edit/table.rs: "does nothing where" to "does not do anything where"src/config/init.rs: "reads nothing of the repo." to "does not read the repo."src/config/migrate.rs: "does nothing." to "does not do anything."src/document/region_build.rs: "has none of." to "does not have."src/document/stack.rs: "reads nothing of a surface," to "does not read a surface,"src/lint/banned_phrases.rs: "finds none of its phrases." to "does not find any of its phrases."src/lint/pattern.rs: "holds none of these characters." to "does not hold any of these characters."src/tag/build_tables.rs: "holds none of them" to "does not hold them"src/tag/function.rs: "does nothing:" to "does not do anything:"src/tag/function.rs: "decides none of them." to "does not decide any of them."src/tag/learned.rs: "reads none of them." to "does not read them."src/tag/pass.rs: "does nothing." to "does not do anything."src/tag/shape.rs: "has none of them." to "does not have any of them."src/tag/single.rs: "does nothing for it." to "does not do anything for it."The 107 edits of the first draft, old to new:
.agents/skills/deslag-release/SKILL.md: "nothing" to "do not / a release"ACKNOWLEDGEMENTS.md: "has none;" to "does not have examples;"ACKNOWLEDGEMENTS.md: "one changes nothing," to "a pass does not change the"Cargo.toml: "prints nothing)." to "does not print a path)."scripts/blobstore/blobs.md: "pushes nothing." to "does not push a layer."src/cli/mod.rs: "write nothing" to "leave the files as they are"src/cli/mod.rs: "write nothing" to "leave the config as it is"src/config/allow.rs: "nothing left to drop," to "its finding already dropped,"src/config/edit/mod.rs: "had none." to "did not have a stamp."src/config/edit/mod.rs: "has none;" to "does not have a stamp;"src/config/edit/mod.rs: "has none / because" to "does not have a line"src/config/edit/mod.rs: "write nothing." to "leave the file as it was."src/config/edit/tests/migrate.rs: "madeedits/ time changes nothing." to "pass ofeditsleaves as it is."src/config/edit/toml/apply.rs: "had none" to "did not have a header"src/config/init.rs: "has none," to "does not have a config,"src/config/init.rs: "writes nothing." to "does not write the file."src/config/init.rs: "checks nothing." to "does not run a check."src/config/lints.rs: "checks nothing." to "does not run a check."src/config/lints.rs: "has none," to "does not have a plain character,"src/config/lints.rs: "bans nothing." to "does not ban a character."src/config/lints.rs: "bans nothing. A" to "does not ban a"src/config/md.rs: "reads none." to "does not read a fence."src/config/migrate.rs: "banned none" to "did not ban a phrase"src/config/migrate.rs: "nothing" to "does not ban a phrase or a character"src/config/migrate.rs: "bans nothing." to "does not ban a phrase."src/config/migrate.rs: "bans nothing." to "does not ban a character."src/config/mod.rs: "has seen nothing since" to "is taken to be from"src/config/mod.rs: "bans nothing; / whole" to "does not ban a phrase;"src/config/mod.rs: "bans nothing" to "does not ban a group"src/config/mod.rs: "it has none" to "the text does not"src/config/mod.rs: "has none." to "does not have a stamp."src/config/redirect.rs: "moves nothing," to "does not move a setting,"src/config/search.rs: "names none" to "does not name a language"src/config/section.rs: "names none." to "does not name a surface."src/config/section.rs: "names none." to "does not name a pattern."src/config/section.rs: "none," to "not require an extension,"src/config/section.rs: "writes none," to "does not write a glob,"src/config/section.rs: "spares nothing" to "does not spare a file"src/config/update.rs: "has none" to "does not have a stamp"src/config/update.rs: "The / holds nothing," to "Nothing in the / is new,"src/config/v1/lints.rs: "switched nothing." to "did not switch a group."src/config/v1/mod.rs: "has none." to "does not have a stamp."src/document/cpp.rs: "records nothing." to "does not record a lexeme."src/document/edit.rs: "nothing," to "an empty range,"src/document/fence.rs: "none," to "not have a region,"src/document/fence.rs: "adds none," to "does not add a region,"src/document/fence.rs: "// / yields nothing" to "// / does not yield a region"src/document/map.rs: "holds nothing" to "does not hold a character"src/document/map.rs: "adds nothing." to "does not add a segment."src/document/mod.rs: "has none." to "does not have a task box."src/document/mod.rs: "none unless" to "pieces only when"src/document/mod.rs: "none unless" to "tokens only when"src/document/mod.rs: "none unless" to "sentences only when"src/document/mod.rs: "has none." to "does not have a parent."src/document/region.rs: "has nothing." to "does not have a line break."src/document/region.rs: "costs nothing." to "is harmless."src/document/skip.rs: "masks nothing," to "does not mask a line,"src/document/skip.rs: "masks nothing," to "does not mask"src/document/stack.rs: "reads none." to "does not read a fence."src/document/stack.rs: "reads nothing in" to "does not read"src/explain/mod.rs: "none / nothing" to "no entries / an empty"src/fix/mod.rs: "adds none," to "does not add a place,"src/fix/mod.rs: "names none. / writes nothing. The" to "does not name a path. / the files"src/fix/mod.rs: "changed nothing is" to "did / change a file is"src/fix/mod.rs: "names none," to "does not name a path,"src/fix/mod.rs: "makes none," to "does not make an edit,"src/glob/select.rs: "matches nothing here adds nothing." to "does not matchdocs/a.mdleaves the specificity as it is."src/instructions/guide.md: "writes nothing." to "does not write a file."src/instructions/lints/banned_phrases.md: "bans nothing." to "does not ban a phrase."src/instructions/lints/max_emphasis.md: "checks nothing:" to "does not run a check:"src/lib.rs: "nothing." to "not / the file."src/lib.rs: "wrote nothing." to "did not write a file."src/lint/allow.rs: "nothing" to "find a match"src/lint/allow.rs: "has none," to "does not have entries,"src/lint/banned_phrases.rs: "bans nothing" to "does not ban a phrase"src/lint/banned_phrases.rs: "means it gives none." to "when the config does not give advice."src/lint/banned_phrases.rs: "bans nothing:" to "does not ban a phrase:"src/lint/banned_phrases.toml: "bans nothing" to "does not ban a phrase"src/lint/max_emphasis.rs: "checks nothing." to "does not run a check."src/lint/mod.rs: "has none." to "does not have a mark."src/lint/mod.rs: "none. / has none:" to "name an edit. / does not have"src/lint/mod.rs: "has none." to "does not have a notice."src/lint/not_at_all.rs: "has none," to "does not have a"src/lint/pattern.rs: "has none" to "does not have a token"src/lint/pattern.rs: "has none" to "does not have a token"src/news.rs: "has none." to "does not have a doc comment."src/output/json.rs: "has none." to "does not"src/output/json.rs: "none." to "an empty list."src/parse/frontmatter.rs: "declares none." to "does not declare a budget."src/tag/closed.rs: "has none." to "does not have an entry."src/tag/function.rs: "decides nothing," to "does not decide the reading,"src/tag/layout.rs: "parses nothing. / the" to "does not parse them."src/tag/lexicon.rs: "gives nothing." to "does not give a reading."src/tag/origin.rs: "has none." to "holds neither."src/tag/origin.rs: "if it has none." to "when the text is empty."src/tag/pass.rs: "changes nothing." to "does not change the reading."src/tag/proper.rs: "has none" to "does not have a lower-case letter"src/tag/proper.rs: "has none" to "does not have a lower-case letter"src/tag/seen.rs: "marks nothing" to "does not mark a word"src/tag/table.rs: "allocates nothing." to "does not allocate."src/tag/types.rs: "holds none." to "is empty."src/tag/weights.rs: "parses nothing," to "does not parse the file,"src/write.rs: "leaves none" to "does not leave a temp file"tests/instructions.rs: "writes nothing")," to "does not write a file"),"The guide, the
allowpage,lints.mdand three lints pages change within their byte budgets;allow.mdfolds "Spaces, tabs and line breaks" to "Whitespace" to fitverbs_nothinginto its 800 bytes.src/instructions/lints/verbs_nothing.mdis 800 of 800 bytes.src/tag/weights.mdnames the new golden file among those a retrain can move. No dependency. One more pattern pass over sentences the tagger already reads.Testing
make ci-fast: exit 0 before every pushmake test: exit 0. The tree test reads human 2, llm 32 and mixed 19 files with a match;tests/golden/verbs_nothing.txtfails 55 of 1230 fixtures (core 2, human 2, llm 32, mixed 19)make test-tieron the image above: exit 0, with the big-tier row of the tablemake check-deslagwith the lint on inmd,rustandtoml: exit 0src/lint/verbs_nothing.rs, including the 22 review sentences with their expected outcome; casesbroken,forms,false_positives,off,custom_message,rustandallow_applied;tests/explain.rs,tests/output.rsand the section tests name the lintReferences