diff --git a/.luacheckrc b/.luacheckrc index 44bb008a9..694ccc435 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -8,6 +8,7 @@ globals = { } read_globals = { + "_ENV", "ANDROID_FONT_DIR", "KOBO_TOUCH_MIRRORED", "KOBO_SYNC_BRIGHTNESS_WITH_NICKEL", diff --git a/Makefile b/Makefile index c2a1bf10c..27b15162a 100644 --- a/Makefile +++ b/Makefile @@ -359,7 +359,7 @@ po: static-check: @if which luacheck > /dev/null; then \ - luacheck -q frontend; \ + luacheck -q frontend plugins; \ else \ echo "[!] luacheck not found. "\ "you can install it with 'luarocks install luacheck'"; \ diff --git a/plugins/evernote.koplugin/clip.lua b/plugins/evernote.koplugin/clip.lua index 3d1593013..57530fe92 100644 --- a/plugins/evernote.koplugin/clip.lua +++ b/plugins/evernote.koplugin/clip.lua @@ -57,7 +57,7 @@ function MyClipping:parseMyClippings() } elseif index == 2 then info = self:getInfo(line) - elseif index == 3 then + -- elseif index == 3 then -- should be a blank line, we skip this line elseif index == 4 then text = self:getText(line) @@ -168,8 +168,10 @@ function MyClipping:getTime(line) local _, _, hour, minute, second = line:find("(%d+):(%d+):(%d+)") if year and month and day and hour and minute and second then for k, v in pairs(pms) do - if line:find(k) then hour = hour + v end - break + if line:find(k) then + hour = hour + v + break + end end local time = os.time({ year = year, month = month, day = day, diff --git a/plugins/evernote.koplugin/slt2.lua b/plugins/evernote.koplugin/slt2.lua index 756ec485f..f1f1faba3 100644 --- a/plugins/evernote.koplugin/slt2.lua +++ b/plugins/evernote.koplugin/slt2.lua @@ -74,6 +74,7 @@ end function slt2.get_dependency(template, start_tag, end_tag) return stable_uniq(include_fold(template, start_tag, end_tag, function(acc, v, name) if type(v) == 'string' then + return acc elseif type(v) == 'table' then if name ~= nil then table.insert(acc, name) diff --git a/plugins/statistics.koplugin/main.lua b/plugins/statistics.koplugin/main.lua index c3a2dc5af..208a4707b 100755 --- a/plugins/statistics.koplugin/main.lua +++ b/plugins/statistics.koplugin/main.lua @@ -125,13 +125,13 @@ function ReaderStatistics:updateSettings() text = "", input_type = "number", hint = T(_("Min seconds, default is 5. Current value: %1"), - self.page_min_read_sec), + self.page_min_read_sec), }, { text = "", input_type = "number", hint = T(_("Max seconds, default is 90. Current value: %1"), - self.page_max_read_sec), + self.page_max_read_sec), }, }, buttons = {