Skip to content

Commit

Permalink
Fix luacheck usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklp09 committed Jul 23, 2023
1 parent d25a2fd commit e67e631
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ unused_args = false

read_globals = {
"minetest",
"string",
"table",
"vector",
"default"
Expand Down
3 changes: 1 addition & 2 deletions font_api/fallbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
-- This is the unicode char fallback map. If a char is not present in
-- font, this maps indicates which char to try to use instead next.

-- luacheck: ignore
return {
-- Lowercase chars
['a'] = 'A', ['b'] = 'B', ['c'] = 'C', ['d'] = 'D',
Expand Down Expand Up @@ -54,7 +53,7 @@ return {
['×'] = 'x', ['Ý'] = 'Y',

-- Lower case accents
['à'] = 'a', ['à'] = 'a', ['á'] = 'a', ['â'] = 'a',
['à'] = 'a', ['á'] = 'a', ['â'] = 'a',
['ã'] = 'a', ['ä'] = 'a', ['å'] = 'a',
['æ'] = 'ae', ['ç'] = 'c',
['è'] = 'e', ['é'] = 'e', ['ê'] = 'e', ['ë'] = 'e',
Expand Down
8 changes: 2 additions & 6 deletions font_api/registry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,9 @@ local function get_default_font()
end
end

-- If failed, chose first font
-- If failed, choose the first registered font
if default_font == nil then
-- luacheck: ignore 512
for _, font in pairs(font_api.registered_fonts) do
default_font = font
break
end
default_font = next(font_api.registered_fonts)
end

-- Error, no font registered
Expand Down

0 comments on commit e67e631

Please sign in to comment.