Skip to content

Adapt incomplete-signature-doc to warn about incomplete, not missing docs #2186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

AndreaWalchshoferSCCH
Copy link
Contributor

Previously, the diagnostic incomplete-signature-doc is ignoring fully undocumented functions - but is already triggered by a simple comment. This turns out to be impractical in a few cases, as it also forces a full documentation of functions that should just be annotated with ---@async (and is therefore not yet fully compatible with await-in-sync)

So this PR adapts the diagnostic to only warn about incomplete signature docs, so it requires at least one @param or @return annotation before a warning is given. (Otherwise, it would be a missing signature doc, and there's separate diagnostics about that...)

…docs (#9)

Previously, the diagnostic `incomplete-signature-doc` is ignoring fully
undocumented functions - but is already triggered by a simple comment.
This turns out to be impractical in a few cases, as it also forces a
full documentation of functions that should just be annotated with
`---@async` (and is therefore not yet fully compatible with
`await-in-sync`)

So this PR adapts the diagnostic to only warn about **incomplete**
signature docs, so it requires at least one `@param` or `@return`
annotation before a warning is given. (Otherwise, it would be a missing
signature doc, and there's separate diagnostics about that...)
@sumneko sumneko merged commit 181e93f into LuaLS:master Jun 28, 2023
@sumneko
Copy link
Collaborator

sumneko commented Jun 28, 2023

Good, thank you!

@AndreaWalchshoferSCCH AndreaWalchshoferSCCH deleted the pr/adapt-incomplete-signature-doc branch June 28, 2023 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants