aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-10-05 16:26:45 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-10-05 16:26:45 +0200
commit8983b5f9a54e180e1df5167811b6432de1721d5e (patch)
treeeb41046c538e4f29bb09c587f4b88e2bc618ddb2
parentd99ec6bb31b042bf0b6111c20d622f64636d2ed6 (diff)
downloadvis-editorconfig-8983b5f9a54e180e1df5167811b6432de1721d5e.tar.gz
declare function-local variables as local
Lua uses the global scope per default. To not clutter the global namespace define function-local variables as local.
-rw-r--r--edconf.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/edconf.lua b/edconf.lua
index 5ef0f1a..cc5738c 100644
--- a/edconf.lua
+++ b/edconf.lua
@@ -166,9 +166,9 @@ OPTIONS = {
-- Compatible with editorconfig-core-lua v0.3.0
function ec_iter(p)
- i = 0
- props, keys = ec.parse(p)
- n = #keys
+ local i = 0
+ local props, keys = ec.parse(p)
+ local n = #keys
return function ()
i = i + 1
if i <= n then