Skip to content

Comments

test(oxlint/lsp): add lint tests on js side#18730

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-30-test_oxlint_add_lint_tests_on_js_side
Feb 5, 2026
Merged

test(oxlint/lsp): add lint tests on js side#18730
graphite-app[bot] merged 1 commit intomainfrom
01-30-test_oxlint_add_lint_tests_on_js_side

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Jan 30, 2026

No description provided.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Jan 30, 2026
Copy link
Member Author

Sysix commented Jan 30, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch from 3b7910a to 3ed2edc Compare January 30, 2026 12:19
@Sysix Sysix changed the title test(oxlint): add lint tests on js side test(oxlint/lsp): add lint tests on js side Jan 30, 2026
@Sysix Sysix marked this pull request as ready for review January 30, 2026 12:28
@Sysix Sysix requested a review from camc314 as a code owner January 30, 2026 12:28
@Sysix Sysix force-pushed the 01-30-test_oxlint_lsp_add_init_tests_on_js_side branch from 3b6131a to ea64f40 Compare January 30, 2026 12:32
@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch from 3ed2edc to de8276e Compare January 30, 2026 12:32
@Sysix Sysix force-pushed the 01-30-test_oxlint_lsp_add_init_tests_on_js_side branch from ea64f40 to f78b41d Compare January 30, 2026 12:33
@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch from de8276e to b692267 Compare January 30, 2026 12:33
@Sysix Sysix requested a review from Copilot January 30, 2026 12:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive LSP linting tests on the JavaScript/TypeScript side for the oxlint LSP server. It enhances the diagnostic formatting to include severity levels and adds test cases covering various configuration scenarios.

Changes:

  • Enhanced diagnostic formatting in test utils to display severity levels (Error, Warning, Information, Hint)
  • Added comprehensive test suite for LSP linting functionality with snapshot testing
  • Created test fixtures covering default behavior, configuration options, and custom config paths

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/oxlint/test/lsp/utils.ts Added DiagnosticSeverity import and enhanced applyDiagnostics function to map and display severity levels in diagnostic output
apps/oxlint/test/lsp/lint/lint.test.ts New test file with comprehensive test cases for LSP linting using snapshot testing, covering basic linting, config options, and initialization options
apps/oxlint/test/lsp/lint/fixtures/default/test.tsx Test fixture file for TypeScript React linting with debugger statement
apps/oxlint/test/lsp/lint/fixtures/default/test.ts Test fixture file for TypeScript linting with debugger statement
apps/oxlint/test/lsp/lint/fixtures/custom-config-path/test.ts Test fixture file for custom config path testing
apps/oxlint/test/lsp/lint/fixtures/custom-config-path/lint.json Custom config file setting no-debugger rule to error
apps/oxlint/test/lsp/lint/fixtures/config-severity/test.ts Test fixture for severity configuration testing
apps/oxlint/test/lsp/lint/fixtures/config-severity/.oxlintrc.json Config file setting no-debugger to error severity
apps/oxlint/test/lsp/lint/fixtures/config-disabled/test.ts Test fixture for disabled rule testing
apps/oxlint/test/lsp/lint/fixtures/config-disabled/.oxlintrc.json Config file disabling no-debugger rule
apps/oxlint/test/lsp/lint/fixtures/config-default/test.ts Test fixture for default configuration
apps/oxlint/test/lsp/lint/fixtures/config-default/.oxlintrc.json Empty default config file
apps/oxlint/test/lsp/lint/snapshots/lint.test.ts.snap Snapshot file containing expected test outputs for all test cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch from b692267 to 38538a5 Compare January 30, 2026 12:49
@Sysix Sysix force-pushed the 01-30-test_oxlint_lsp_add_init_tests_on_js_side branch from f78b41d to 52808d6 Compare January 30, 2026 14:40
@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch from 38538a5 to 4f3644f Compare January 30, 2026 14:40
@Sysix Sysix force-pushed the 01-30-test_oxlint_lsp_add_init_tests_on_js_side branch from 52808d6 to e4a7c67 Compare January 30, 2026 16:48
@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch from 4f3644f to e908858 Compare January 30, 2026 16:48
@Sysix Sysix changed the base branch from 01-30-test_oxlint_lsp_add_init_tests_on_js_side to graphite-base/18730 January 30, 2026 17:20
@Sysix Sysix marked this pull request as draft January 30, 2026 18:09
@Sysix Sysix force-pushed the graphite-base/18730 branch from e4a7c67 to 6ed9b2a Compare January 31, 2026 14:33
@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch from e908858 to a666e25 Compare January 31, 2026 14:33
@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch from a666e25 to ca16199 Compare January 31, 2026 16:37
@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch from b55a4e0 to f4579ef Compare February 2, 2026 21:29
@Sysix Sysix force-pushed the 01-30-test_oxlint_lsp_add_init_tests_on_js_side branch 2 times, most recently from 9ce4531 to 5ecee3f Compare February 3, 2026 18:17
@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch 4 times, most recently from 8654b7e to e001415 Compare February 3, 2026 19:39
@github-actions github-actions bot added the A-editor Area - Editor and Language Server label Feb 3, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 3, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing 01-30-test_oxlint_add_lint_tests_on_js_side (f76df1b) with 01-30-test_oxlint_lsp_add_init_tests_on_js_side (5544c15)1

Summary

✅ 46 untouched benchmarks
⏩ 3 skipped benchmarks2

Footnotes

  1. No successful run was found on 01-30-test_oxlint_lsp_add_init_tests_on_js_side (7fb0711) during the generation of this report, so ccdfb09 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch 6 times, most recently from cd5a477 to c0e4470 Compare February 3, 2026 20:27
@Sysix
Copy link
Member Author

Sysix commented Feb 3, 2026

@camc314 @overlookmotel

  [LSP STDERR] 2026-02-03T20:32:12.992453Z DEBUG oxc_language_server::backend: oxc initialized.
  2026-02-03T20:32:12.992897Z DEBUG oxlint::lsp::server_linter: lint /home/runner/work/oxc/oxc/apps/oxlint/test/lsp/lint/fixtures/config-js-plugin/test.js
  
  [LSP STDERR] 2026-02-03T20:32:13.025749Z ERROR tower_lsp_server::transport: failed to decode message: failed to encode response: Resource temporarily unavailable (os error 11)

https://github.com/oxc-project/oxc/actions/runs/21646573385/job/62400049984?pr=18730

I can not explain why this error happens in CI (local without a problem) only with the JS Plugin configuration. This must be in the lint part of LSP-Server. The error message does not really explain much for me, :/ This is probably the return part of the diagnostic request, but I have no knowledge about the OS error :(

@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch 2 times, most recently from 2119759 to 74752d5 Compare February 5, 2026 16:41
@Sysix Sysix force-pushed the 01-30-test_oxlint_lsp_add_init_tests_on_js_side branch from 5ecee3f to 7fb0711 Compare February 5, 2026 16:41
@Sysix Sysix force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch 2 times, most recently from 9b4ae47 to f76df1b Compare February 5, 2026 17:18
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Feb 5, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 5, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the 01-30-test_oxlint_lsp_add_init_tests_on_js_side branch from 7fb0711 to c740e07 Compare February 5, 2026 20:47
@graphite-app graphite-app bot force-pushed the 01-30-test_oxlint_add_lint_tests_on_js_side branch from f76df1b to 7badd2b Compare February 5, 2026 20:48
Base automatically changed from 01-30-test_oxlint_lsp_add_init_tests_on_js_side to main February 5, 2026 20:54
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 5, 2026
@graphite-app graphite-app bot merged commit 7badd2b into main Feb 5, 2026
22 checks passed
@graphite-app graphite-app bot deleted the 01-30-test_oxlint_add_lint_tests_on_js_side branch February 5, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-editor Area - Editor and Language Server A-linter Area - Linter A-linter-plugins Area - Linter JS plugins C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant