Skip to content

feat: missingDocs linter warns about empty doc strings#13188

Merged
wkrozowski merged 6 commits intoleanprover:masterfrom
wkrozowski:wojciech/missing_doc
Mar 30, 2026
Merged

feat: missingDocs linter warns about empty doc strings#13188
wkrozowski merged 6 commits intoleanprover:masterfrom
wkrozowski:wojciech/missing_doc

Conversation

@wkrozowski
Copy link
Copy Markdown
Contributor

@wkrozowski wkrozowski commented Mar 30, 2026

This PR extends the missingDocs linter to detect and warn about empty doc strings (e.g. /---/ or /-- -/), in addition to missing doc strings. Previously, an empty doc comment would silence the linter even though it provides no documentation value. Now empty doc strings produce a distinct "empty doc string for ..." warning, while @[inherit_doc] still suppresses warnings as before.

@wkrozowski wkrozowski added the changelog-language Language features and metaprograms label Mar 30, 2026
@wkrozowski wkrozowski changed the title feat: missingDocs linter now is now triggered by empty docstrings feat: missingDocs linter warns about empty doc strings Mar 30, 2026
@wkrozowski wkrozowski marked this pull request as ready for review March 30, 2026 14:34
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Mar 30, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 6f2745d88b3c92394d857d56a53d65d961255356 --onto 4786e082dca22873d14d2a5b9b7c8843380c6e78. You can force Mathlib CI using the force-mathlib-ci label. (2026-03-30 15:27:55)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 6f2745d88b3c92394d857d56a53d65d961255356 --onto cfa8c5a036d6990635c6ec50b02d0e806995cec3. You can force reference manual CI using the force-manual-ci label. (2026-03-30 15:27:58)

@wkrozowski wkrozowski added this pull request to the merge queue Mar 30, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 30, 2026
@wkrozowski wkrozowski added this pull request to the merge queue Mar 30, 2026
Merged via the queue into leanprover:master with commit f395593 Mar 30, 2026
19 checks passed
volodeyka pushed a commit that referenced this pull request Apr 16, 2026
This PR extends the `missingDocs` linter to detect and warn about empty
doc strings (e.g. `/---/` or `/-- -/`), in addition to missing doc
strings. Previously, an empty doc comment would silence the linter even
though it provides no documentation value. Now empty doc strings produce
a distinct "empty doc string for ..." warning, while `@[inherit_doc]`
still suppresses warnings as before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-language Language features and metaprograms toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants