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 --- script/proto/diagnostic.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'script/proto/diagnostic.lua') diff --git a/script/proto/diagnostic.lua b/script/proto/diagnostic.lua index 48a9094c..7f76c435 100644 --- a/script/proto/diagnostic.lua +++ b/script/proto/diagnostic.lua @@ -100,6 +100,15 @@ m.register { status = 'Any', } +m.register { + 'incomplete-signature-doc', + 'missing-global-doc', +} { + group = 'luadoc', + severity = 'Warning', + status = 'None', +} + m.register { 'codestyle-check' } { -- cgit v1.2.3