• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sile-typesetter / sile / 14860011647

06 May 2025 12:44PM UTC coverage: 67.057% (+32.5%) from 34.559%
14860011647

push

github

alerque
chore(typesetters): Fixup access to class from typesetter functions

7 of 7 new or added lines in 2 files covered. (100.0%)

1344 existing lines in 103 files now uncovered.

14880 of 22190 relevant lines covered (67.06%)

11549.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.44
/core/init.lua
1
-- Reserve scope placeholder for profiler (developer tooling)
2
local ProFi
3

4
local function runEvals (evals, arg)
5
   for _, snippet in ipairs(evals) do
306✔
6
      local pId = SILE.traceStack:pushText(snippet)
×
7
      local status, func = pcall(load, snippet)
×
8
      if status and type(func) == "function" then
×
9
         func()
×
10
      else
11
         SU.error(("Error parsing code provided in --%s snippet: %s"):format(arg, snippet))
×
12
      end
13
      SILE.traceStack:pop(pId)
×
14
   end
15
end
16

17
local function init ()
18
   if SILE.input.makedeps then
153✔
19
      SILE.makeDeps = require("core.makedeps")
153✔
20
      SILE.makeDeps.filename = SILE.input.makedeps
153✔
21
   end
22
   if SILE.backend then
153✔
23
      SU.deprecated("SILE.backend", "SILE.input.backend", "0.15.7", "0.17.0")
×
24
      SILE.input.backend = SILE.backend
×
25
   end
26
   for _, tree in ipairs(SILE.input.luarocksTrees) do
153✔
27
      _G["extendSilePathRocks"](tree)
×
28
   end
29
   SILE.fontmanager = SILE.fontmanager or SILE.fontmanagers[SILE.input.fontmanager or "default"]()
459✔
30
   if SILE.input.backend then
153✔
UNCOV
31
      if SILE.input.backend == "cairo" then
×
UNCOV
32
         SILE.shaper = SILE.shapers[SILE.input.shaper or "pango"]()
×
33
      end
34
      SILE.outputter = SILE.outputters[SILE.input.outputter or SILE.input.backend]()
×
35
   end
36
   SILE.shaper = SILE.shaper or SILE.shapers[SILE.input.shaper or "default"]()
459✔
37
   SILE.outputter = SILE.outputter or SILE.outputters[SILE.input.outputter or "libtexpdf"]()
459✔
38
   io.stdout:setvbuf("no")
153✔
39
   if SU.debugging("profile") then
306✔
40
      ProFi = require("ProFi")
×
41
      ProFi:start()
×
42
   end
43
   if SILE.makeDeps then
153✔
44
      SILE.makeDeps:add(_G.executablePath)
153✔
45
   end
46
   runEvals(SILE.input.evaluates, "evaluate")
153✔
47
end
48

49
local function finish ()
50
   SILE.documentState.documentClass:finish()
153✔
51
   SILE.font.finish()
153✔
52
   runEvals(SILE.input.evaluateAfters, "evaluate-after")
153✔
53
   if SILE.makeDeps then
153✔
54
      SILE.makeDeps:write()
153✔
55
   end
56
   if not SILE.quiet then
153✔
57
      io.stderr:write("\n")
153✔
58
   end
59
   if SU.debugging("profile") then
306✔
UNCOV
60
      ProFi:stop()
×
UNCOV
61
      ProFi:writeReport(pl.path.splitext(SILE.input.filenames[1]) .. ".profile.txt")
×
62
   end
63
   if SU.debugging("versions") then
306✔
64
      SILE.shaper:debugVersions()
153✔
65
   end
66
end
67

68
return {
302✔
69
   init = init,
302✔
70
   finish = finish,
302✔
71
}
302✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc