-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rule to remove unused variable #172
Conversation
"local a, b, c = ... return b" | ||
) => "local a, b = ... return b", | ||
remove_variable_before_tuple_extract( | ||
"local a, b, c = true, ... return b" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to think about it for a moment again but yes 😄Equivalent to:
local a = true
local b, c = ...
return b
So you can get rid of a
and c
Coverage after merging remove-unused-identifiers into main will be
Coverage Report for Changed Files
|
Closes #26
Add a new
remove_unused_variable
rule 🚀