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

sile-typesetter / sile / 14284237390

05 Apr 2025 05:33PM UTC coverage: 63.158% (+31.8%) from 31.375%
14284237390

push

github

web-flow
Merge pull request #2248 from alerque/class-warfare

Normalize module layout across all module types

257 of 350 new or added lines in 14 files covered. (73.43%)

71 existing lines in 11 files now uncovered.

13670 of 21644 relevant lines covered (63.16%)

3070.68 hits per line

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

55.36
/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
310✔
NEW
6
      local pId = SILE.traceStack:pushText(snippet)
×
NEW
7
      local status, func = pcall(load, snippet)
×
NEW
8
      if status and type(func) == "function" then
×
NEW
9
         func()
×
10
      else
NEW
11
         SU.error(("Error parsing code provided in --%s snippet: %s"):format(arg, snippet))
×
12
      end
NEW
13
      SILE.traceStack:pop(pId)
×
14
   end
15
end
16

17
local function init ()
18
   if SILE.input.makedeps then
155✔
19
      SILE.makeDeps = require("core.makedeps")
155✔
20
      SILE.makeDeps.filename = SILE.input.makedeps
155✔
21
   end
22
   if SILE.backend then
155✔
NEW
23
      SU.deprecated("SILE.backend", "SILE.input.backend", "0.15.7", "0.17.0")
×
NEW
24
      SILE.input.backend = SILE.backend
×
25
   end
26
   for _, tree in ipairs(SILE.input.luarocksTrees) do
155✔
NEW
27
      _G["extendSilePathRocks"](tree)
×
28
   end
29
   if not SILE.input.backend then
155✔
30
      SILE.input.backend = "libtexpdf"
155✔
31
   end
32
   if SILE.input.backend == "libtexpdf" then
155✔
33
      SILE.shaper = SILE.shapers.harfbuzz()
465✔
34
      SILE.outputter = SILE.outputters.libtexpdf()
465✔
NEW
35
   elseif SILE.input.backend == "cairo" then
×
NEW
36
      SILE.shaper = SILE.shapers.pango()
×
NEW
37
      SILE.outputter = SILE.outputters.cairo()
×
NEW
38
   elseif SILE.input.backend == "debug" then
×
NEW
39
      SILE.shaper = SILE.shapers.harfbuzz()
×
NEW
40
      SILE.outputter = SILE.outputters.debug()
×
NEW
41
   elseif SILE.input.backend == "text" then
×
NEW
42
      SILE.shaper = SILE.shapers.harfbuzz()
×
NEW
43
      SILE.outputter = SILE.outputters.text()
×
NEW
44
   elseif SILE.input.backend == "dummy" then
×
NEW
45
      SILE.shaper = SILE.shapers.harfbuzz()
×
NEW
46
      SILE.outputter = SILE.outputters.dummy()
×
47
   end
48
   SILE.pagebuilder = SILE.pagebuilders.default()
465✔
49
   io.stdout:setvbuf("no")
155✔
50
   if SU.debugging("profile") then
310✔
NEW
51
      ProFi = require("ProFi")
×
NEW
52
      ProFi:start()
×
53
   end
54
   if SILE.makeDeps then
155✔
55
      SILE.makeDeps:add(_G.executablePath)
155✔
56
   end
57
   runEvals(SILE.input.evaluates, "evaluate")
155✔
58
end
59

60
local function finish ()
61
   SILE.documentState.documentClass:finish()
155✔
62
   SILE.font.finish()
155✔
63
   runEvals(SILE.input.evaluateAfters, "evaluate-after")
155✔
64
   if SILE.makeDeps then
155✔
65
      SILE.makeDeps:write()
155✔
66
   end
67
   if not SILE.quiet then
155✔
68
      io.stderr:write("\n")
155✔
69
   end
70
   if SU.debugging("profile") then
310✔
NEW
71
      ProFi:stop()
×
NEW
72
      ProFi:writeReport(pl.path.splitext(SILE.input.filenames[1]) .. ".profile.txt")
×
73
   end
74
   if SU.debugging("versions") then
310✔
75
      SILE.shaper:debugVersions()
155✔
76
   end
77
end
78

79
return {
306✔
80
   init = init,
306✔
81
   finish = finish,
306✔
82
}
306✔
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

© 2026 Coveralls, Inc