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

sile-typesetter / sile / 9304060604

30 May 2024 02:07PM UTC coverage: 74.124% (-0.6%) from 74.707%
9304060604

push

github

alerque
style: Reformat Lua with stylua

8104 of 11995 new or added lines in 184 files covered. (67.56%)

15 existing lines in 11 files now uncovered.

12444 of 16788 relevant lines covered (74.12%)

7175.1 hits per line

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

14.81
/core/repl.lua
1
local repl = {}
181✔
2

3
local _repl
4

5
function repl.initRepl ()
181✔
NEW
6
   _repl = require("repl.console")
×
NEW
7
   local has_linenoise, linenoise = pcall(require, "linenoise")
×
NEW
8
   if has_linenoise then
×
NEW
9
      _repl:loadplugin("linenoise")
×
NEW
10
      linenoise.enableutf8()
×
11
   else
12
      -- XXX check that we're not receiving input from a non-tty
NEW
13
      local has_rlwrap = os.execute("which rlwrap >/dev/null 2>/dev/null") == 0
×
NEW
14
      if has_rlwrap and not os.getenv("LUA_REPL_RLWRAP") then
×
NEW
15
         local command = "LUA_REPL_RLWRAP=1 rlwrap"
×
NEW
16
         local index = 0
×
NEW
17
         while arg[index - 1] do
×
NEW
18
            index = index - 1
×
19
         end
NEW
20
         while arg[index] do
×
NEW
21
            command = string.format("%s %q", command, arg[index])
×
NEW
22
            index = index + 1
×
23
         end
NEW
24
         os.execute(command)
×
NEW
25
         return
×
26
      end
27
   end
NEW
28
   _repl:loadplugin("history")
×
NEW
29
   _repl:loadplugin("completion")
×
NEW
30
   _repl:loadplugin("autoreturn")
×
NEW
31
   _repl:loadplugin("rcfile")
×
32
end
33

34
function repl:enter ()
181✔
NEW
35
   if not _repl then
×
NEW
36
      self.initRepl()
×
37
   end
NEW
38
   _repl:run()
×
39
end
40

41
return repl
181✔
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