Age | Commit message (Collapse) | Author |
|
#1990
|
|
fix #2252
|
|
The `unused-local` diagnostic already hard-codes to exclude `_`.
`cast-local-type` should also ignore `_` variables, to avoid warnings
in, for example, nested loops like:
```lua
for _, list in ipairs(lists) do
for _, item in ipairs(list) do
_, result = pcall(...)
end
end
```
|
|
#1990
|
|
|
|
#1990
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Feature] Add action to autorequire undefined globals
|
|
|
|
|
|
Previously, the diagnostic `incomplete-signature-doc` is ignoring fully
undocumented functions - but is already triggered by a simple comment.
This turns out to be impractical in a few cases, as it also forces a
full documentation of functions that should just be annotated with
`---@async` (and is therefore not yet fully compatible with
`await-in-sync`)
So this PR adapts the diagnostic to only warn about **incomplete**
signature docs, so it requires at least one `@param` or `@return`
annotation before a warning is given. (Otherwise, it would be a missing
signature doc, and there's separate diagnostics about that...)
|
|
Improved eq error message in test/code_action/init.lua
Uses core.diagnostics.undefined-global
|
|
|
|
|
|
fix #2083
|
|
|
|
Annotation for the following local function func1 is required.
local mod = { }
local function func1()
end
mod.Func1 = func1
return mod;
|
|
|
|
|
|
Revert Changes made from unrelated PR
|
|
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
|
|
- diagnostic `uppercase-local` in group `conventions`, disabled by
default
- isolated unit tests for diagnostic
|
|
This reverts commit 43794193ef981ffecb477bfce444428ded852aa0.
|
|
|
|
* Add warning for any global variable via diagnostic
* Add messages in en-US
TODO: add messages in languages other than en-us as well
* fallback: enable/disable diagnostics w/ annotation
* Add tests for the new diagnostic
* Add diagnostic and group to config.md
|
|
fix #1922
|
|
fix #1715
|
|
|
|
|
|
|
|
|
|
|
|
#1702
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resolve #1619
|
|
|
|
|
|
|
|
resolve #1374
|