Skip to content

chore: lint deslag's own comments for verbs negated through their objects - #147

Merged
webern merged 2 commits into
mainfrom
m/dcode-rustdg
Oct 9, 2026
Merged

webern merged 2 commits into
mainfrom
m/dcode-rustdg

Conversation

@webern

@webern webern commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

The [rust] section merged in #146 lets deslag lint the comments of its own source. This turns on verbs_no_nouns there, as [md] already has it, and rewords what it found.

The lint flags a verb negated through its object, as in ships no X. This repo writes does not ship X, so "has no budget" became "does not have a budget", and so on across 45 files under src/. Only comments change: no code, no case, no golden file, no .stderr, no tags.txt. density stays off for Rust, because it fires on the //! module docs.

The one config change is the new [rust.lints.verbs_no_nouns] table in .agents/deslag.toml. No other setting, threshold or exception list moved.

Counts, measured by make check-deslag on efb39fd:

  • 89 findings before, in 45 files, 0 after.
  • 88 rewordings. Two findings were in one sentence (src/change/mod.rs:111 and :112).
  • 8 of the 89 findings were false by the lint's own definition, 9% of them. By cause: tagger 5, a mention of the lint's own example 3, plain // text without code spans 0, other 0.
  • None is left. The 3 mentions of the example (bakes no cakes) are in code spans now. The 5 tagger cases read a noun phrase as a verb followed by no: "lines no wider than", "the ones no lint had settings for" (twice), "goes no further than", "confirm's no business". Each had an honest rewording that says the same thing, so each was reworded and none is exempted.

A comment that made a claim that was not true would have had the claim dropped. None needed it.

Testing

  • make test: exit 0
  • make check-fmt check-clippy check-doc check-typos check-deslag: exit 0
  • deslag check --base origin/main: exit 0
  • no file outside src/ and .agents/deslag.toml changes

References

…ects

Turn on verbs_no_nouns in the [rust] section of deslag's own config and
reword the 89 places in the comments of src/ that it found. The house
style is to negate the verb, so "has no budget" is now "does not have a
budget". Where a comment quoted the lint's own example, the example is
now in a code span.

Only comments change. The density lint stays off for Rust: it fires on
the module docs.
@webern webern added docs Documentation including agent instructions, readmes, code comments, etc. ai Primarily authored by AI (whether PR, Issue, Whatever) area/lint Deals with the linting algorithms themselves, how they work. labels Oct 8, 2026
Say "any" where a singular read as one particular key, file or field,
and keep the origin checks' comment from reading as if they are skipped.
@webern
webern marked this pull request as ready for review October 9, 2026 00:03
@webern
webern merged commit 0873400 into main Oct 9, 2026
3 of 4 checks passed
@webern
webern deleted the m/dcode-rustdg branch October 9, 2026 00:04
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Primarily authored by AI (whether PR, Issue, Whatever) area/lint Deals with the linting algorithms themselves, how they work. docs Documentation including agent instructions, readmes, code comments, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant