Skip to content

llscheck fails with lua-language-server version 3.13.6 + the future of this repository #14

@ColinKennedy

Description

@ColinKennedy

I tried out the new pretty formatter from neovim/neovim#29073 (comment), lua-language-server version 3.13.6. In short it works but breaks llscheck.

git clone [email protected]:ColinKennedy/nvim-best-practices-plugin-template.git
make llscheck

This works with older lua-language-server versions (e.g. 3.7.4) but in 3.13.6, this error comes up

Command failed: lua-language-server --check . --checklevel Warning --logpath /tmp/lua_GwSJZL --configpath .luarc.json

So with that said I wanted to mention two separate things

  1. Will this repository get archived / deprecated?
  2. If so, are you open to suggestions for the output of --check_format=pretty?

If the intent is to deprecate it'd be helpful if the two produce similar output. For example

llscheck

VIMRUNTIME="`nvim --clean --headless --cmd 'lua io.write(os.getenv("VIMRUNTIME"))' --cmd 'quit'`" llscheck --configpath $(CONFIGURATION) .
lua/plugin_template/_commands/hello_world/say/runner.lua:104:25-28: param-type-mismatch: Cannot assign `string?` to parameter `string`.
- Optional type cannot match `string`
- Type `nil` cannot match `string`

Total 1: 1 Warnings in 1 files

lua-language-server

VIMRUNTIME="`nvim --clean --headless --cmd 'lua io.write(os.getenv("VIMRUNTIME"))' --cmd 'quit'`" lua-language-server --check_format=pretty --check=.
./lua/plugin_template/_commands/hello_world/say/runner.lua:104:25 [Warning] Cannot assign `string?` to parameter `string`.
- Optional type cannot match `string`
- Type `nil` cannot match `string` (param-type-mismatch)
        word = vim.fn.split(word, " ")[1] -- Make sure it's only one word
                            ^^^^
Diagnosis complete, 1 problems found

The llscheck version includes the error code in the same line as the path:line:column: description line. Which makes it easier to integrate with existing tools (e.g. Vim). It also summarizes the number of files affected and severities. It'd be nice if lua-language-server does that too.

Anyway if the intent is to keep this repository around it'd be great to fix it for later lua-language-server versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions