Skip to content

feat(emmylua_check): library #589

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

Merged
merged 1 commit into from
Jul 9, 2025
Merged

Conversation

mrcjkb
Copy link
Contributor

@mrcjkb mrcjkb commented Jul 8, 2025

This PR introduces a cli feature flag (enabled by default) to emmylua_check.
If disabled, it removes the clap dependency. This should allow the use of emmylua_check as a library in CLI applications that use a conflicting version of clap (see #580).

If you agree with this approach, I'll look into implementing the same for the other CLI tools.

@mrcjkb mrcjkb force-pushed the mj/push-xssluzkussnn branch from 13cdac1 to 176c214 Compare July 8, 2025 21:43
@CppCXY
Copy link
Member

CppCXY commented Jul 9, 2025

Please fix test

@mrcjkb mrcjkb force-pushed the mj/push-xssluzkussnn branch from 176c214 to 5c99ea7 Compare July 9, 2025 08:52
@mrcjkb
Copy link
Contributor Author

mrcjkb commented Jul 9, 2025

🤔 hmm, this test failure seems unrelated. Is it passing on main?
Edit: It also fails here on main.

failures:

---- handlers::test::hover_function_test::tests::test_3 stdout ----

thread 'handlers::test::hover_function_test::tests::test_3' panicked at crates/emmylua_ls/src/handlers/test/hover_function_test.rs:117:9:
assertion failed: ws.check_hover(r#"
                ---@type Hover.Test3<string>
                local test3

                local <??>event = test3.event
            "#,
    VirtualHoverResult {
        value: "```lua\n(method) Test3:event(event: \"B\", key: string)\n```\n\n&nbsp;&nbsp;in class `Hover.Test3`\n\n---\n\n---\n\n```lua\n(method) Test3:event(event: \"A\", key: string)\n```".to_string(),
    })

@mrcjkb mrcjkb force-pushed the mj/push-xssluzkussnn branch from 5c99ea7 to 5e41e4b Compare July 9, 2025 10:12
@CppCXY CppCXY merged commit a346ea4 into EmmyLuaLs:main Jul 9, 2025
15 checks passed
@mrcjkb mrcjkb deleted the mj/push-xssluzkussnn branch July 9, 2025 11:18
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.

2 participants