Skip to content

fix: skip redundant-parameter check when last arg is multi-return call#1014

Open
EfveZombie wants to merge 2 commits intoEmmyLuaLs:mainfrom
EfveZombie:fix.skip-redundant-param-multi-return
Open

fix: skip redundant-parameter check when last arg is multi-return call#1014
EfveZombie wants to merge 2 commits intoEmmyLuaLs:mainfrom
EfveZombie:fix.skip-redundant-param-multi-return

Conversation

@EfveZombie
Copy link
Copy Markdown

Skip the redundant-parameter diagnostic when the last argument is a multi-return function call (e.g. table.unpack), avoiding false positives.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the parameter count diagnostic to account for multi-return function calls, such as table.unpack, when used as the final argument in a call. This change prevents false positives for redundant parameters. Feedback suggests narrowing the detection logic to specifically check for CallExpr types, as other variadic expressions in Lua do not expand into multiple values in that position.

@EfveZombie EfveZombie force-pushed the fix.skip-redundant-param-multi-return branch from e2a97e3 to 0ab12e8 Compare April 10, 2026 14:25
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.

1 participant