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 /locale/pt-br | |
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 'locale/pt-br')
-rw-r--r-- | locale/pt-br/script.lua | 12 | ||||
-rw-r--r-- | locale/pt-br/setting.lua | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/locale/pt-br/script.lua b/locale/pt-br/script.lua index 6497c520..be6de9b2 100644 --- a/locale/pt-br/script.lua +++ b/locale/pt-br/script.lua @@ -114,7 +114,17 @@ DIAG_UNDEFINED_DOC_NAME = 'Tipo ou alias indefinido `{}`.' DIAG_UNDEFINED_DOC_PARAM = 'Parâmetro indefinido `{}`.' -DIAG_UNKNOWN_DIAG_CODE = +DIAG_MISSING_GLOBAL_DOC_COMMENT = -- TODO: need translate! +'Missing comment for global function `{}`.' +DIAG_MISSING_GLOBAL_DOC_PARAM = -- TODO: need translate! +'Missing @param annotation for parameter `{}` in global function `{}`.' +DIAG_MISSING_GLOBAL_DOC_RETURN = -- TODO: need translate! +'Missing @return annotation at index `{}` in global function `{}`.' +DIAG_INCOMPLETE_SIGNATURE_DOC_PARAM = -- TODO: need translate! +'Incomplete signature. Missing @param annotation for parameter `{}` in function `{}`.' +DIAG_INCOMPLETE_SIGNATURE_DOC_RETURN = -- TODO: need translate! +'Incomplete signature. Missing @return annotation at index `{}` in function `{}`.' +DIAG_UNKNOWN_DIAG_CODE = -- TODO: need translate! 'Código de diagnóstico desconhecido `{}`.' DIAG_CAST_LOCAL_TYPE = -- TODO: need translate! 'This variable is defined as type `{def}`. Cannot convert its type to `{ref}`.' diff --git a/locale/pt-br/setting.lua b/locale/pt-br/setting.lua index ec94f575..5038a5da 100644 --- a/locale/pt-br/setting.lua +++ b/locale/pt-br/setting.lua @@ -373,8 +373,12 @@ config.diagnostics['duplicate-doc-param'] = -- TODO: need translate! 'Enable diagnostics for a duplicated param annotation name.' config.diagnostics['duplicate-set-field'] = -- TODO: need translate! 'Enable diagnostics for setting the same field in a class more than once.' +config.diagnostics['incomplete-signature-doc'] = -- TODO: need translate! +'Incomplete @param or @return annotations for functions.' config.diagnostics['invisible'] = -- TODO: need translate! 'Enable diagnostics for accesses to fields which are invisible.' +config.diagnostics['missing-global-doc'] = -- TODO: need translate! +'Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.' config.diagnostics['missing-parameter'] = -- TODO: need translate! 'Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.' config.diagnostics['missing-return'] = -- TODO: need translate! |