Commit: a5f1f335487d7eb33bade17a07e45ff1646f2384
Parent: 86a4edccbbb85abe6f01af12e0fe10c525a8f027
Author: Randy Palamar
Date: Tue, 23 May 2023 22:17:06 -0600
use 'vis-lint: ' as output prefix for spacing lines
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/init.lua b/init.lua
@@ -41,25 +41,25 @@ local run_actions_on_file = function(action, actions, file, modify)
.. (file.name or "unnamed file"))
return
end
- -- Print this for clarity and separate different outputs in the vis:message buffer
- local header = "--- " .. action .. ": "
- vis:message(header .. "running " .. action .. " (" .. os.date() .. ")")
+ -- print this to separate different outputs in the message buffer
+ local prefix = "--- vis-lint: "
+ vis:message(prefix .. "running " .. action .. " (" .. os.date() .. ")")
local all_succeeded = true
for _, cmd in ipairs(cmds) do
- vis:message(header .. "piping "
- .. (file.name or "unnamed file")
+ vis:message(prefix .. "piping "
+ .. (file.name or "buffer")
.. " to `" .. cmd .. "`")
local ret = run_on_file(cmd, file, modify)
if ret ~= 0 then
all_succeeded = false
- -- Exit early if any fixer fails as indicated by the exit status
+ -- exit early if modify was specified
if modify then
vis:message("Command failed with exit code: " .. ret)
return false
end
end
end
- vis:message(header .. "done")
+ vis:message(prefix .. "done")
return all_succeeded
end