diff options
author | Thomas Wetzlmaier <thomas.wetzlmaier@scch.at> | 2023-04-19 16:49:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 16:49:35 +0200 |
commit | be232fcf95aab66d751b5dbaff9ccaf06299cc8e (patch) | |
tree | ef5e5753a8d5021591b95c589088223608e83294 /doc/zh-cn | |
parent | 27cfa2e23648b015a94fab6e0938ec42a5a040e5 (diff) | |
download | lua-language-server-be232fcf95aab66d751b5dbaff9ccaf06299cc8e.zip |
Warn about missing '---comment', '@return' and '@param' annotations (#3)
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
Diffstat (limited to 'doc/zh-cn')
-rw-r--r-- | doc/zh-cn/config.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index 1cacfed3..32a6db68 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -240,6 +240,7 @@ Array<string> * ``"exp-in-action"`` * ``"global-element"`` * ``"global-in-nil-env"`` +* ``"incomplete-signature-doc"`` * ``"index-in-func-name"`` * ``"invisible"`` * ``"jump-local-scope"`` @@ -284,6 +285,7 @@ Array<string> * ``"miss-sep-in-table"`` * ``"miss-space-between"`` * ``"miss-symbol"`` +* ``"missing-global-doc"`` * ``"missing-parameter"`` * ``"missing-return"`` * ``"missing-return-value"`` @@ -450,6 +452,8 @@ object<string, string> * duplicate-doc-alias * duplicate-doc-field * duplicate-doc-param + * incomplete-signature-doc + * missing-global-doc * undefined-doc-class * undefined-doc-name * undefined-doc-param @@ -574,6 +578,8 @@ object<string, string> * duplicate-doc-alias * duplicate-doc-field * duplicate-doc-param + * incomplete-signature-doc + * missing-global-doc * undefined-doc-class * undefined-doc-name * undefined-doc-param @@ -795,6 +801,10 @@ object<string, string> */ "global-in-nil-env": "Any", /* + Enable diagnostics for function definitions which are not fully annotated. + */ + "incomplete-signature-doc": "None", + /* Enable diagnostics for accesses to fields which are invisible. */ "invisible": "Any", @@ -803,6 +813,10 @@ object<string, string> */ "lowercase-global": "Any", /* + Enable diagnostics for global function definitions which are not fully annotated. + */ + "missing-global-doc": "None", + /* Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters. */ "missing-parameter": "Any", @@ -1050,6 +1064,10 @@ object<string, string> */ "global-in-nil-env": "Warning", /* + Enable diagnostics for function definitions which are not fully annotated. + */ + "incomplete-signature-doc": "Warning", + /* Enable diagnostics for accesses to fields which are invisible. */ "invisible": "Warning", @@ -1058,6 +1076,10 @@ object<string, string> */ "lowercase-global": "Information", /* + Enable diagnostics for global function definitions which are not annotated. + */ + "missing-global-doc": "Warning", + /* Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters. */ "missing-parameter": "Warning", |