Skip to content

Settings don't seem to be applied when using linter from CLI #2038

Closed
@AndreaWalchshoferSCCH

Description

@AndreaWalchshoferSCCH

How are you using the lua-language-server?

Command Line

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

I am using the language-server.exe binary from the release archive for linting in a pipeline.
As I want to use the same linting settings as in the dev environment, I use the --configpath flag for passing the path of the settings file.
e.g. .\language-server\bin\lua-language-server.exe --configpath .\.vscode\settings.json --check .\Coding\Demo\workshop_01

I expect the language-server.exe to apply these settings and e.g. not report for a diagnostic I turned off in the settings file.

Actual Behaviour

In all of my attempts (using settings.json from .vscode, setting up a .luarc.json with the same settings) I couldn't get the tool to use the settings file.
So no settings were applied, and also the log files were saying that no settings were loaded:

[17:59:24.472][warn] [#0:script\config\loader.lua:116]: No config?	nil
[17:59:24.472][warn] [#0:script\config\loader.lua:116]: No config?	nil
[17:59:24.472][info] [#0:script\provider\provider.lua:61]: Load config from client	fallback
[17:59:24.472][info] [#0:script\provider\provider.lua:62]: nil

Reproduction steps

  1. Prepare lua-language-server.exe
  2. Prepare lua source that will result in a diagnostic problem
  3. Prepare settings file that will disable the diagnostic that would find a problem from step 2
  4. Execute the binary supplying (2) with the --check flag and (3) with the --configpath flag

Additional Notes

I tried following the Wiki pages to find out why the settings I try to use are not applied, but I am not sure if I use the flag wrong (wrong flag, wrong syntax, wrong settings format?) or if the language-server itself just does not use it due to some bug.
I also use the --logpath flag similarly and don't have any problems with that.

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions