diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 0000000..e8e7622 --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,22 @@ +name: Type Check Code Base +on: + pull_request: ~ + push: + branches: + - master + +jobs: + build: + name: Type Check Code Base + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Type Check Code Base + uses: mrcjkb/lua-typecheck-action@v0 + with: + directories: | + lua + tests diff --git a/.luacheckrc b/.luarc similarity index 100% rename from .luacheckrc rename to .luarc diff --git a/lua/ado/marker.lua b/lua/ado/marker.lua index f8c58d4..b29ae3e 100644 --- a/lua/ado/marker.lua +++ b/lua/ado/marker.lua @@ -7,8 +7,10 @@ local M = { local Path = require("plenary.path") ---Get open file paths with bufnrs +---@diagnostic disable-next-line: undefined-doc-name ---@return table local function get_open_file_paths() + ---@diagnostic disable-next-line: undefined-doc-name ---@type table local open_file_paths = {} local buffers = vim.api.nvim_list_bufs() diff --git a/lua/ado/project.lua b/lua/ado/project.lua index 8d30bbc..6a7b3ab 100644 --- a/lua/ado/project.lua +++ b/lua/ado/project.lua @@ -17,7 +17,7 @@ local function format_project_choice(project) end ---Set project_name in cache file; ----@param project_cache_path Path +---@diagnostic disable-next-line: undefined-doc-name ---@return string|nil err local function set_project_name_cache(project_cache_path) local projects, err = require("ado.api").get_projects() diff --git a/lua/ado/utils.lua b/lua/ado/utils.lua index 063ad01..f050934 100644 --- a/lua/ado/utils.lua +++ b/lua/ado/utils.lua @@ -1,5 +1,6 @@ local M = {} --- Await result of plenary job +---@diagnostic disable-next-line: undefined-doc-name ---@param job Job ---@return unknown function M.await_result(job) @@ -9,7 +10,7 @@ function M.await_result(job) return result end vim.wait(1000, function() - ---@diagnostic disable-next-line: missing-return + ---@diagnostic disable-next-line: missing-return,undefined-field result = job:result() end) end