Closed sircfenner closed 3 months ago
Haven't figured out the exact pattern of this but created minimal repros of a couple of problem cases.
Current behavior, when running darklua process with remove_unused_variable as the only rule:
darklua process
remove_unused_variable
Case 1
local x local y sideEffects()
generates:
<empty file>
The call to sideEffects() should be preserved.
sideEffects()
Case 2
sideEffects() local x sideEffects()
<empty lines> sideEffects()
The additional call to sideEffects() should be preserved.
Tested on darklua version 0.13.0.
Thank you for the report, I'll add these test cases too. I really really messed up that rule apparently 😅
Related to #182
Haven't figured out the exact pattern of this but created minimal repros of a couple of problem cases.
Current behavior, when running
darklua process
withremove_unused_variable
as the only rule:Case 1
generates:
The call to
sideEffects()
should be preserved.Case 2
generates:
The additional call to
sideEffects()
should be preserved.Tested on darklua version 0.13.0.