diff --git a/lua/cp/health.lua b/lua/cp/health.lua index c46ba1d..1149169 100644 --- a/lua/cp/health.lua +++ b/lua/cp/health.lua @@ -77,7 +77,7 @@ end function M.check() local version = require("cp.version") vim.health.start("cp.nvim health check") - + vim.health.info("Version: " .. version.version) if version.semver then vim.health.info("Semantic version: v" .. version.semver.full) diff --git a/lua/cp/scrape.lua b/lua/cp/scrape.lua index 8456fce..8bf1fdc 100644 --- a/lua/cp/scrape.lua +++ b/lua/cp/scrape.lua @@ -89,7 +89,6 @@ function M.scrape_problem(ctx) return data end - if #data.test_cases > 0 then local all_inputs = {} local all_outputs = {} diff --git a/lua/cp/version.lua b/lua/cp/version.lua index a243646..0cd247d 100644 --- a/lua/cp/version.lua +++ b/lua/cp/version.lua @@ -3,12 +3,12 @@ local M = {} local function get_git_version() local plugin_path = debug.getinfo(1, "S").source:sub(2) local plugin_root = vim.fn.fnamemodify(plugin_path, ":h:h:h") - - local result = vim.system({"git", "describe", "--tags", "--always", "--dirty"}, { + + local result = vim.system({ "git", "describe", "--tags", "--always", "--dirty" }, { cwd = plugin_root, - text = true + text = true, }):wait() - + if result.code == 0 then return result.stdout:gsub("\n", "") else @@ -24,7 +24,7 @@ local function parse_semver(version_string) full = semver, major = tonumber(major), minor = tonumber(minor), - patch = tonumber(patch) + patch = tonumber(patch), } end return nil @@ -33,4 +33,4 @@ end M.version = get_git_version() M.semver = parse_semver(M.version) -return M \ No newline at end of file +return M diff --git a/plugin/cp.lua b/plugin/cp.lua index 516ecd8..9fc7e28 100644 --- a/plugin/cp.lua +++ b/plugin/cp.lua @@ -20,4 +20,3 @@ end, { end, commands) end, }) -