summaryrefslogtreecommitdiff
path: root/script/proto/diagnostic.lua
diff options
context:
space:
mode:
authorThomas Wetzlmaier <thomas.wetzlmaier@scch.at>2023-04-19 16:49:35 +0200
committerGitHub <noreply@github.com>2023-04-19 16:49:35 +0200
commitbe232fcf95aab66d751b5dbaff9ccaf06299cc8e (patch)
treeef5e5753a8d5021591b95c589088223608e83294 /script/proto/diagnostic.lua
parent27cfa2e23648b015a94fab6e0938ec42a5a040e5 (diff)
downloadlua-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 'script/proto/diagnostic.lua')
-rw-r--r--script/proto/diagnostic.lua9
1 files changed, 9 insertions, 0 deletions
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
@@ -101,6 +101,15 @@ m.register {
}
m.register {
+ 'incomplete-signature-doc',
+ 'missing-global-doc',
+} {
+ group = 'luadoc',
+ severity = 'Warning',
+ status = 'None',
+}
+
+m.register {
'codestyle-check'
} {
group = 'codestyle',