Adds Formatting to the CI (#69)

This MR adds linting and formatting to the CI pipeline for the repository for both the Golang and Lua code.
This commit is contained in:
Harrison (Harry) Cramer
2023-10-30 23:54:38 -04:00
committed by GitHub
parent 3a67424fec
commit a055c4c988
31 changed files with 484 additions and 453 deletions

View File

@@ -12,18 +12,20 @@ M.start = function(callback)
local parsed_port = nil
local callback_called = false
local command = state.settings.bin
.. " "
.. state.settings.project_id
.. " "
.. state.settings.gitlab_url
.. " "
.. port
.. " "
.. state.settings.auth_token
.. " "
.. "'" .. vim.json.encode(state.settings.debug) .. "'"
.. " "
.. state.settings.log_path
.. " "
.. state.settings.project_id
.. " "
.. state.settings.gitlab_url
.. " "
.. port
.. " "
.. state.settings.auth_token
.. " "
.. "'"
.. vim.json.encode(state.settings.debug)
.. "'"
.. " "
.. state.settings.log_path
local job_id = vim.fn.jobstart(command, {
on_stdout = function(_, data)
@@ -61,7 +63,7 @@ M.start = function(callback)
vim.notify(err_msg, vim.log.levels.ERROR)
end
end,
on_exit = function(job_id, exit_code, ...)
on_exit = function(job_id, exit_code)
vim.notify(
"Golang gitlab server exited: job_id: " .. job_id .. ", exit_code: " .. exit_code,
vim.log.levels.ERROR
@@ -88,7 +90,7 @@ M.build = function(override)
end
local cmd = u.is_windows() and "cd %s\\cmd && go build -o bin.exe && move bin.exe ..\\"
or "cd %s/cmd && go build -o bin && mv bin ../bin"
or "cd %s/cmd && go build -o bin && mv bin ../bin"
local command = string.format(cmd, state.settings.bin_path)
local null = u.is_windows() and " >NUL" or " > /dev/null"