[chore] Convert a couple more todos (#5267)

Cf. <https://github.com/koreader/koreader/pull/5244>.

Also update check.
pull/5272/head
Frans de Jonge 5 years ago committed by GitHub
parent ba8099f906
commit be87fb27a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,7 +28,7 @@ if [ "${tab_detected}" ]; then
exit 1
fi
untagged_todo=$(grep -Pin "[^\-]\-\-\s+@?(todo|fixme|warning)" --include \*.lua --exclude={dateparser.lua,xml.lua} --recursive {reader,setupkoenv,datastorage}.lua frontend plugins spec || true)
untagged_todo=$(grep -Pin "[^\-]\-\-(\s+)?@?(todo|fixme|warning)" --include \*.lua --exclude={dateparser.lua,xml.lua} --recursive {reader,setupkoenv,datastorage}.lua frontend plugins spec || true)
if [ "${untagged_todo}" ]; then
echo -e "\\n${ANSI_RED}Warning: possible improperly tagged todo, fixme or warning detected."
echo -e "\\n${ANSI_RED} use --- followed by @todo, @fixme or @warning."

@ -642,7 +642,7 @@ function ReaderRolling:onPanning(args, _)
end
function ReaderRolling:onZoom()
--@TODO re-read doc_height info after font or lineheight changes 05.06 2012 (houqp)
--- @todo Re-read doc_height info after font or lineheight changes. 05.06 2012 (houqp)
self:updatePos()
end

@ -228,7 +228,7 @@ Warning! this method won't update self.state, you need to do it
in each state method!
--]]
function GestureDetector:switchState(state_new, tev, param)
--@TODO do we need to check whether state is valid? (houqp)
--- @todo Do we need to check whether state is valid? (houqp)
return self[state_new](self, tev, param)
end

@ -192,7 +192,7 @@ end
function Kindle:usbPlugOut()
-- NOTE: See usbPlugIn(), we don't have anything fancy to do here either.
--@TODO signal filemanager for file changes 13.06 2012 (houqp)
--- @todo signal filemanager for file changes 13.06 2012 (houqp)
self.charging_mode = false
end
@ -211,7 +211,7 @@ function Kindle:ambientBrightnessLevel()
return 4
end
-- Make sure the C BB cannot be used on devices with a 4bpp fb
--- Makes sure the C BB cannot be used on devices with a 4bpp fb.
function Kindle:blacklistCBB()
local ffi = require("ffi")
local dummy = require("ffi/posix_h")

@ -118,7 +118,7 @@ function PdfDocument:getUsedBBox(pageno)
if used.x1 > pwidth then used.x1 = pwidth end
if used.y0 < 0 then used.y0 = 0 end
if used.y1 > pheight then used.y1 = pheight end
--@TODO give size for cacheitem? 02.12 2012 (houqp)
--- @todo Give size for cacheitem? 02.12 2012 (houqp)
Cache:insert(hash, CacheItem:new{
ubbox = used,
})

@ -62,14 +62,14 @@ function FrameContainer:paintTo(bb, x, y)
local container_width = self.width or my_size.w
local container_height = self.height or my_size.h
--@TODO get rid of margin here? 13.03 2013 (houqp)
--- @todo get rid of margin here? 13.03 2013 (houqp)
if self.background then
bb:paintRoundedRect(x, y,
container_width, container_height,
self.background, self.radius)
end
if self.inner_bordersize > 0 then
-- NOTE: This doesn't actually support radius, it'll always be a square.
--- @warning This doesn't actually support radius, it'll always be a square.
bb:paintInnerBorder(x + self.margin, y + self.margin,
container_width - self.margin * 2,
container_height - self.margin * 2,

@ -9,7 +9,7 @@ local LineWidget = Widget:new{
style = "solid",
background = Blitbuffer.COLOR_BLACK,
dimen = nil,
--@TODO replay dirty hack here 13.03 2013 (houqp)
--- @todo Replay dirty hack here 13.03 2013 (houqp).
empty_segments = nil,
}

@ -57,7 +57,7 @@ function ItemShortCutIcon:init()
background = Blitbuffer.COLOR_LIGHT_GRAY
end
--@TODO calculate font size by icon size 01.05 2012 (houqp)
--- @todo Calculate font size by icon size 01.05 2012 (houqp).
local sc_face
if self.key:len() > 1 then
sc_face = Font:getFace("ffont", 14)
@ -673,7 +673,7 @@ function Menu:init()
is_enter_default = true,
callback = function()
for k, v in ipairs(self.item_table) do
--TODO support utf8 lowercase
--- @todo Support utf8 lowercase.
local filename = util.basename(v.path):lower()
local search_string = self.page_info_text.input_dialog:getInputText():lower()
local i, _ = filename:find(search_string)

@ -94,7 +94,7 @@ function TextWidget:paintTo(bb, x, y)
--self:_render()
--end
--bb:blitFrom(self._bb, x, y, 0, 0, self._length, self._bb:getHeight())
--@TODO Don't use kerning for monospaced fonts. (houqp)
--- @todo Don't use kerning for monospaced fonts. (houqp)
if self.max_width and RenderText:sizeUtf8Text(0, Screen:getWidth(), self.face, self.text, true, self.bold).x > self.max_width then
self.text = RenderText:truncateTextByWidth(self.text, self.face, self.max_width, true)
end

@ -150,7 +150,7 @@ function Send2Ebook:process()
if total_entries > 1 then total_entries = total_entries -2 end --remove result "../" (upper folder) and "./" (current folder)
for idx, ftp_file in ipairs(ftp_files_table) do
logger.dbg("Send2Ebook: processing ftp_file:", ftp_file)
--TODO recursive download folders
--- @todo Recursive download folders.
if ftp_file["type"] == "file" then
info = InfoMessage:new{ text = T(_("Processing %1/%2"), count, total_entries) }

Loading…
Cancel
Save