Skip to content

Fix #2343, support pre-commit #3253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

Freed-Wu
Copy link
Contributor

@Freed-Wu Freed-Wu commented Aug 17, 2025

It still has problem.

$ ~/.cache/pre-commit/repodgg0oidb/lua_env-default/lib/luarocks/rocks-5.1/lua-language-server/scm-1/bin/lua-language-server --check .
# ...
spec/test_spec.lua:8:16 [Warning] Undefined field `are`. (undefined-field)
            assert.are.equal(parse_key("<M-C-S>", {}), parse_key("s", { "Control", "Alt" }))
                   ^^^
Diagnosis complete, 49 problems found
$ echo $?
1

It is expected. However,

$ ~/.cache/pre-commit/repodgg0oidb/lua_env-default/bin/lua-language-server --check .
# ...
spec/test_spec.lua:8:16 [Warning] Undefined field `are`. (undefined-field)
            assert.are.equal(parse_key("<M-C-S>", {}), parse_key("s", { "Control", "Alt" }))
                   ^^^
Diagnosis complete, 49 problems found
$ echo $?
0

Because it return 0, check always be passed.

$ pre-commit run lua-language-server-check -a
[INFO] Initializing environment for https://github.com/Freed-Wu/lua-language-server.
[INFO] Installing environment for https://github.com/Freed-Wu/lua-language-server.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
lua language server check................................................Passed

Test file:

---
repos:
  - repo: https://github.com/Freed-Wu/lua-language-server
    rev: 3.15.1
    hooks:
      - id: lua-language-server-check

@Freed-Wu Freed-Wu marked this pull request as draft August 17, 2025 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant