Skip to content

Conversation

overhacked
Copy link
Contributor

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:

for _, list in ipairs(lists) do
  for _, item in ipairs(list) do
    _, result = pcall(...)
  end
end

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
```
@overhacked overhacked changed the title Ignore cast-local-type diagnostic for _ local Ignore cast-local-type diagnostic for _ local Aug 14, 2023
@sumneko
Copy link
Collaborator

sumneko commented Aug 15, 2023

Thank you!

@sumneko sumneko merged commit 7a47ada into LuaLS:master Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants