From 27cfa2e23648b015a94fab6e0938ec42a5a040e5 Mon Sep 17 00:00:00 2001 From: AndreaWalchshoferSCCH <122894794+AndreaWalchshoferSCCH@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:02:59 +0200 Subject: Add diagnostic to enforce lowercase local element names (#6) - diagnostic `uppercase-local` in group `conventions`, disabled by default - isolated unit tests for diagnostic --- locale/pt-br/script.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'locale/pt-br/script.lua') diff --git a/locale/pt-br/script.lua b/locale/pt-br/script.lua index affcd893..6497c520 100644 --- a/locale/pt-br/script.lua +++ b/locale/pt-br/script.lua @@ -150,8 +150,10 @@ DIAG_INVISIBLE_PROTECTED = -- TODO: need translate! 'Field `{field}` is protected, it can only be accessed in class `{class}` and its subclasses.' DIAG_INVISIBLE_PACKAGE = -- TODO: need translate! 'Field `{field}` can only be accessed in same file `{uri}`.' -DIAG_GLOBAL_ELEMENT = -- TODO: need translate! +DIAG_GLOBAL_ELEMENT = -- TODO: need translate! 'Element is global.' +DIAG_UPPERCASE_LOCAL = -- TODO: need translate! +'Local element `{}` must start with lowercase letter' MWS_NOT_SUPPORT = '{} não é suportado múltiplos espaços de trabalho por enquanto, posso precisar reiniciar para estabelecer um novo espaço de trabalho ...' -- cgit v1.2.3 From be232fcf95aab66d751b5dbaff9ccaf06299cc8e Mon Sep 17 00:00:00 2001 From: Thomas Wetzlmaier Date: Wed, 19 Apr 2023 16:49:35 +0200 Subject: 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 --- locale/pt-br/script.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'locale/pt-br/script.lua') 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}`.' -- cgit v1.2.3 From 171703c12f571d15550aacc40a45cc6a312d8b1d Mon Sep 17 00:00:00 2001 From: AndreaWalchshoferSCCH Date: Mon, 24 Apr 2023 11:03:18 +0200 Subject: Cleanup PR Revert Changes made from unrelated PR --- locale/pt-br/script.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'locale/pt-br/script.lua') diff --git a/locale/pt-br/script.lua b/locale/pt-br/script.lua index be6de9b2..5d4d70b5 100644 --- a/locale/pt-br/script.lua +++ b/locale/pt-br/script.lua @@ -160,10 +160,8 @@ DIAG_INVISIBLE_PROTECTED = -- TODO: need translate! 'Field `{field}` is protected, it can only be accessed in class `{class}` and its subclasses.' DIAG_INVISIBLE_PACKAGE = -- TODO: need translate! 'Field `{field}` can only be accessed in same file `{uri}`.' -DIAG_GLOBAL_ELEMENT = -- TODO: need translate! +DIAG_GLOBAL_ELEMENT = -- TODO: need translate! 'Element is global.' -DIAG_UPPERCASE_LOCAL = -- TODO: need translate! -'Local element `{}` must start with lowercase letter' MWS_NOT_SUPPORT = '{} não é suportado múltiplos espaços de trabalho por enquanto, posso precisar reiniciar para estabelecer um novo espaço de trabalho ...' -- cgit v1.2.3