Skip to content

Conversation

wetzlmaier
Copy link
Contributor

Two new rules

"incomplete-signature-doc": Enable diagnostics for function definitions which are not fully annotated with a @param or @return annotation. It checks local as well as global functions that have at least one @param or @return annotation.

"missing-global-doc": Enable diagnostics for global function definitions. It check, if all parameters and return values have been described with a @param or @return annotation.

Both rules are deactived by default.

AndreaWalchshoferSCCH and others added 3 commits April 4, 2023 11:02
- diagnostic `uppercase-local` in group `conventions`, disabled by
default
- isolated unit tests for diagnostic
All functions that have at least one such annotation should be fully annotated in that respect, because we find that partially annotating something leads to confusion.
However, all global functions must always be fully annotated, because they should be avoided in the first place, but if necessary then only with the maximum amount of documentation/support for those who use them!

We provide the following keys for the `diagnostics.disable` setting to specifically deactive these checks:
_missing-global-doc_: global function definitions which are not fully annotated.
_incomplete-signature-doc_: function definitions that have some annotations but are not fully annotated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated file, please cleanup your PR

Revert Changes made from unrelated PR
@sumneko sumneko merged commit f5e44aa into LuaLS:master Apr 24, 2023
@sumneko
Copy link
Collaborator

sumneko commented Apr 24, 2023

Thank you!

@AndreaWalchshoferSCCH AndreaWalchshoferSCCH deleted the pr/missing-global-doc branch April 24, 2023 11:37
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.

4 participants