mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
[CI] Add a check to detect tab in lua files (#3919)
This commit is contained in:
committed by
Frans de Jonge
parent
0fc7a5ed6d
commit
dad7f209fa
@@ -21,5 +21,12 @@ if [ "${unscaled_size_check}" ] || [ "${unscaled_size_check_geom}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tab_detected=$(grep -P "\\t" --include \*.lua --exclude={dateparser.lua,xml.lua} --recursive {reader,setupkoenv,datastorage}.lua frontend plugins spec || true)
|
||||
if [ "${tab_detected}" ]; then
|
||||
echo -e "\\n${ANSI_RED}Error TAB character detected"
|
||||
echo "${tab_detected}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "\n${ANSI_GREEN}Luacheck results"
|
||||
luajit "$(which luacheck)" --no-color -q {reader,setupkoenv,datastorage}.lua frontend plugins spec
|
||||
|
||||
@@ -80,8 +80,8 @@ end
|
||||
-- HTML quality) in a file named as the .ifo with a .lua
|
||||
-- extension, containing for example:
|
||||
-- return function(html)
|
||||
-- html = html:gsub("<hr>", "<hr/>")
|
||||
-- return html
|
||||
-- html = html:gsub("<hr>", "<hr/>")
|
||||
-- return html
|
||||
-- end
|
||||
local function getDictionaryFixHtmlFunc(path)
|
||||
if lfs.attributes(path, "mode") == "file" then
|
||||
|
||||
@@ -34,8 +34,8 @@ local KEY_HOME = 0x1a
|
||||
local KEY_BACK = 0x1b
|
||||
local KEY_PREV2 = 0x1c
|
||||
local KEY_NEXT2 = 0x1d
|
||||
local KEY_COVEROPEN = 0x02
|
||||
local KEY_COVERCLOSE = 0x03
|
||||
local KEY_COVEROPEN = 0x02
|
||||
local KEY_COVERCLOSE = 0x03
|
||||
-- luacheck: pop
|
||||
|
||||
ffi.cdef[[
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
return {
|
||||
-- list your feeds here:
|
||||
-- list your feeds here:
|
||||
|
||||
{ "http://feeds.reuters.com/Reuters/worldNews?format=xml", limit = 2, download_full_article=true},
|
||||
|
||||
{ "https://www.pcworld.com/index.rss", limit = 7 , download_full_article=false},
|
||||
|
||||
-- comment out line ("--" at line start) to stop downloading source
|
||||
-- comment out line ("--" at line start) to stop downloading source
|
||||
--{ "http://www.football.co.uk/international/rss.xml", limit = 0 , download_full_article=false},
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ return {
|
||||
|
||||
|
||||
|
||||
--HELP:
|
||||
-- use syntax: {"your_url", limit= max_number_of_items_to_be_created, download_full_article=true/false}
|
||||
--HELP:
|
||||
-- use syntax: {"your_url", limit= max_number_of_items_to_be_created, download_full_article=true/false}
|
||||
|
||||
-- set 'limit' to change number of 'news' to be created
|
||||
-- set 'limit' to change number of 'news' to be created
|
||||
-- 'limit' equal "0" means no limit.
|
||||
|
||||
-- 'download_full_article=false' - means download full article using feed link (may not always work correctly)
|
||||
-- 'download_full_article=true' - means use only feed description to create feeds (usually only part of the article)
|
||||
-- 'download_full_article=false' - means download full article using feed link (may not always work correctly)
|
||||
-- 'download_full_article=true' - means use only feed description to create feeds (usually only part of the article)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -877,7 +877,7 @@ function ReaderStatistics:getTodayBookStats()
|
||||
FROM page_stat
|
||||
WHERE start_time >= '%s'
|
||||
GROUP BY id_book, page
|
||||
)
|
||||
)
|
||||
]]
|
||||
local today_pages, today_period = conn:rowexec(string.format(sql_stmt, start_today_time))
|
||||
if today_pages == nil then
|
||||
|
||||
Reference in New Issue
Block a user