diff --git a/.tests/luacheckrc b/.tests/luacheckrc index 36f9fd9..7c036ae 100644 --- a/.tests/luacheckrc +++ b/.tests/luacheckrc @@ -2,11 +2,17 @@ quiet = 1 codes = true exclude_files = { - ".luarocks/*" + ".luarocks/*", + "worldeditadditions/utils/bit.lua" } -ignore = {"631", "61[124]", "412", "21[123]"} +ignore = { + "631", "61[124]", + "412", + "321/bit", + "21[123]" +} -- Read-write globals (i.e. they can be defined) globals = { diff --git a/worldeditadditions/utils/format/human_size.lua b/worldeditadditions/utils/format/human_size.lua index 2403ff0..7bb600c 100644 --- a/worldeditadditions/utils/format/human_size.lua +++ b/worldeditadditions/utils/format/human_size.lua @@ -5,7 +5,7 @@ -- @param decimals number The number of decimal places to show. -- @return string A formatted string that represents the given input number. function worldeditadditions.format.human_size(n, decimals) - sizes = { "", "K", "M", "G", "T", "P", "E", "Y", "Z" } + local sizes = { "", "K", "M", "G", "T", "P", "E", "Y", "Z" } local factor = math.floor((#tostring(n) - 1) / 3) local multiplier = 10^(decimals or 0) local result = math.floor(0.5 + (n / math.pow(1000, factor)) * multiplier) / multiplier