Skip to content

Make luacheck >= 0.26 happy#1489

Merged
Frenzie merged 1 commit into
koreader:masterfrom
NiLuJe:luacheck-0.26
Jun 8, 2022
Merged

Make luacheck >= 0.26 happy#1489
Frenzie merged 1 commit into
koreader:masterfrom
NiLuJe:luacheck-0.26

Conversation

@NiLuJe

@NiLuJe NiLuJe commented Jun 6, 2022

Copy link
Copy Markdown
Member

Re: #1487


This change is Reviewable

@Frenzie Frenzie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do prefer all of these; it's possible I should reevaluate koreader/koreader#9174 (comment) slightly.

Comment thread ffi/mupdf.lua
setmetatable(mupdf_doc, document_mt)

if not (mupdf_doc:getPages() > 0) then
if mupdf_doc:getPages() <= 0 then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably do prefer this.

@NiLuJe NiLuJe Jun 6, 2022

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, that's the only one that gave me pause (mostly because I don't quite recall what happens on merror if getPages fails anyway :D).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would assume that it'll fail ungracefully with both writing styles. ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants