Skip to content

Commit 6c60788

Browse files
author
Martin Armbruster
committed
Added missing descriptions for diagnostics.
1 parent 0a10872 commit 6c60788

File tree

2 files changed

+111
-74
lines changed

2 files changed

+111
-74
lines changed

package.nls.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,29 @@
3131
"config.develop.enable": "Developer mode. Do not enable, performance will be affected.",
3232
"config.diagnostics.ambiguity": "* ambiguity-1\n* count-down-loop\n* different-requires\n* newfield-call\n* newline-call",
3333
"config.diagnostics.ambiguity-1": "Enable ambiguous operator precedence diagnostics. For example, the `num or 0 + 1` expression will be suggested `(num or 0) + 1` instead.",
34+
"config.diagnostics.assign-type-mismatch": "Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable.",
3435
"config.diagnostics.await": "* await-in-sync\n* not-yieldable",
36+
"config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.",
37+
"config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.",
38+
"config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.",
39+
"config.diagnostics.circle-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.",
40+
"config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.",
41+
"config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.",
3542
"config.diagnostics.codestyle": "* codestyle-check\n* spell-check",
43+
"config.diagnostics.codestyle-check": "Enable diagnostics for incorrectly styled lines.",
44+
"config.diagnostics.count-down-loop": "Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.",
45+
"config.diagnostics.deprecated": "Enable diagnostics to highlight deprecated API.",
46+
"config.diagnostics.different-requires": "Enable diagnostics for files which are required by two different paths.",
3647
"config.diagnostics.disable": "Disabled diagnostic (Use code in hover brackets).",
3748
"config.diagnostics.disableScheme": "Do not diagnose Lua files that use the following scheme.",
49+
"config.diagnostics.discard-returns": "Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.",
50+
"config.diagnostics.doc-field-no-class": "Enable diagnostics to highlight a field annotation without a defining class annotation.",
3851
"config.diagnostics.duplicate": "* duplicate-index\n* duplicate-set-field",
52+
"config.diagnostics.duplicate-doc-alias": "Enable diagnostics for a duplicated alias annotation name.",
53+
"config.diagnostics.duplicate-doc-field": "Enable diagnostics for a duplicated field annotation name.",
54+
"config.diagnostics.duplicate-doc-param": "Enable diagnostics for a duplicated param annotation name.",
3955
"config.diagnostics.duplicate-index": "Enable duplicate table index diagnostics.",
56+
"config.diagnostics.duplicate-set-field": "Enable diagnostics for setting the same field in a class more than once.",
4057
"config.diagnostics.empty-block": "Enable empty code block diagnostics.",
4158
"config.diagnostics.enable": "Enable diagnostics.",
4259
"config.diagnostics.global": "* global-in-nil-env\n* lowercase-global\n* undefined-env-child\n* undefined-global",
@@ -54,21 +71,41 @@
5471
"config.diagnostics.libraryFiles.Opened": "Only when these files are opened will it be diagnosed.",
5572
"config.diagnostics.lowercase-global": "Enable lowercase global variable definition diagnostics.",
5673
"config.diagnostics.luadoc": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator",
74+
"config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.",
75+
"config.diagnostics.missing-return": "Enable diagnostics for functions with return annotations which have no return statement.",
76+
"config.diagnostics.missing-return-value": "Enable diagnostics for return statements without values although the containing function declares returns.",
77+
"config.diagnostics.need-check-nil": "Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.",
5778
"config.diagnostics.neededFileStatus": "* Opened: only diagnose opened files\n* Any: diagnose all files\n* None: disable this diagnostic\n\nEnd with `!` means override the group setting `diagnostics.groupFileStatus`.\n",
5879
"config.diagnostics.newfield-call": "Enable newfield call diagnostics. It is raised when the parenthesis of a function call appear on the following line when defining a field in a table.",
5980
"config.diagnostics.newline-call": "Enable newline call diagnostics. Is's raised when a line starting with `(` is encountered, which is syntactically parsed as a function call on the previous line.",
81+
"config.diagnostics.no-unknown": "Enable diagnostics for cases in which the type cannot be inferred.",
82+
"config.diagnostics.not-yieldable": "Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.",
83+
"config.diagnostics.param-type-mismatch": "Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.",
6084
"config.diagnostics.redefined": "* redefined-local",
6185
"config.diagnostics.redefined-local": "Enable redefined local variable diagnostics.",
6286
"config.diagnostics.redundant-parameter": "Enable redundant function parameter diagnostics.",
87+
"config.diagnostics.redundant-return": "Enable diagnostics for return statements which are not needed because the function would exit on its own.",
88+
"config.diagnostics.redundant-return-value": "Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.",
6389
"config.diagnostics.redundant-value": "Enable the redundant values assigned diagnostics. It's raised during assignment operation, when the number of values is higher than the number of objects being assigned.",
90+
"config.diagnostics.return-type-mismatch": "Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.",
6491
"config.diagnostics.severity": "Modify the diagnostic severity.\n\nEnd with `!` means override the group setting `diagnostics.groupSeverity`.\n",
92+
"config.diagnostics.spell-check": "Enable diagnostics for typos in strings.",
6593
"config.diagnostics.strict": "* close-non-object\n* deprecated\n* discard-returns",
6694
"config.diagnostics.strong": "* no-unknown",
6795
"config.diagnostics.trailing-space": "Enable trailing space diagnostics.",
6896
"config.diagnostics.type-check": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field",
6997
"config.diagnostics.unbalanced": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments",
98+
"config.diagnostics.unbalanced-assignments": "Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).",
99+
"config.diagnostics.undefined-doc-class": "Enable diagnostics for class annotations in which an undefined class is referenced.",
100+
"config.diagnostics.undefined-doc-name": "Enable diagnostics for type annotations referencing an undefined type or alias.",
101+
"config.diagnostics.undefined-doc-param": "Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.",
70102
"config.diagnostics.undefined-env-child": "Enable undefined environment variable diagnostics. It's raised when `_ENV` table is set to a new literal table, but the used global variable is no longer present in the global environment.",
103+
"config.diagnostics.undefined-field": "Enable diagnostics for cases in which an undefined field of a variable is read.",
71104
"config.diagnostics.undefined-global": "Enable undefined global variable diagnostics.",
105+
"config.diagnostics.unknown-cast-variable": "Enable diagnostics for casts of undefined variables.",
106+
"config.diagnostics.unknown-diag-code": "Enable diagnostics in cases in which an unknown diagnostics code is entered.",
107+
"config.diagnostics.unknown-operator": "Enable diagnostics for unknown operators.",
108+
"config.diagnostics.unreachable-code": "Enable diagnostics for unreachable code.",
72109
"config.diagnostics.unused": "* code-after-break\n* empty-block\n* redundant-return\n* trailing-space\n* unreachable-code\n* unused-function\n* unused-label\n* unused-local\n* unused-vararg",
73110
"config.diagnostics.unused-function": "Enable unused function diagnostics.",
74111
"config.diagnostics.unused-label": "Enable unused label diagnostics.",

0 commit comments

Comments
 (0)