darklua icon indicating copy to clipboard operation
darklua copied to clipboard

Remove constant function calls

Open jeparlefrancais opened this issue 3 years ago • 3 comments

Takes something like this:

local function getFoo()
    return "foo"
end
local var = getFoo()

And turns into:

local function getFoo()
    return "foo"
end
local var = "foo"

The function itself does not have to be cleaned up by this rule, it can be left to a rule that removes unused variables (#26)

jeparlefrancais avatar Sep 01 '21 14:09 jeparlefrancais