Diff

util/set.lua @ 6674:a0ce52e11122

util.set: Add luacheck annotation for methods not referencing 'self'
author Matthew Wild <mwild1@gmail.com>
date Wed, 06 May 2015 19:51:07 +0100
parent 6673:b123fcd65d2e
child 6675:cb5b56ddabfd
line wrap: on
line diff
--- a/util/set.lua	Wed May 06 19:50:40 2015 +0100
+++ b/util/set.lua	Wed May 06 19:51:07 2015 +0100
@@ -66,6 +66,9 @@
 	local items = setmetatable({}, items_mt);
 	local set = { _items = items };
 
+	-- We access the set through an upvalue in these methods, so ignore 'self' being unused
+	--luacheck: ignore 212/self
+
 	function set:add(item)
 		items[item] = true;
 	end