mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
chore: fix all luacheck errors for plugins
This commit is contained in:
@@ -8,6 +8,7 @@ globals = {
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
"_ENV",
|
||||
"ANDROID_FONT_DIR",
|
||||
"KOBO_TOUCH_MIRRORED",
|
||||
"KOBO_SYNC_BRIGHTNESS_WITH_NICKEL",
|
||||
|
||||
2
Makefile
2
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'"; \
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user