-
-
Notifications
You must be signed in to change notification settings - Fork 782
test(language_server): add test for init_nested_configs
#10728
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
test(language_server): add test for init_nested_configs
#10728
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
5b30814 to
a60c3fb
Compare
CodSpeed Instrumentation Performance ReportMerging #10728 will not alter performanceComparing Summary
|
WalkthroughThis change adds new empty JSON configuration files named 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
⏰ Context from checks skipped due to timeout of 90000ms (14)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
crates/oxc_language_server/src/worker.rs (1)
506-521: Test validates nested config directory detectionThis test correctly verifies that
init_nested_configsfinds all three nested configuration directories, validating the directory hierarchy matches the expected structure.Minor comment: The comment on line 514 "sorting the key because for consistent tests results" could be improved for clarity.
- // sorting the key because for consistent tests results + // Sort the paths for consistent test results across different filesystems
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
crates/oxc_language_server/fixtures/linter/init_nested_configs/.oxlintrc.json(1 hunks)crates/oxc_language_server/fixtures/linter/init_nested_configs/deep1/.oxlintrc.json(1 hunks)crates/oxc_language_server/fixtures/linter/init_nested_configs/deep1/deep2/.oxlintrc.json(1 hunks)crates/oxc_language_server/src/linter/mod.rs(1 hunks)crates/oxc_language_server/src/worker.rs(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
crates/oxc_language_server/src/worker.rs (1)
crates/oxc_language_server/src/linter/tester.rs (1)
get_file_uri(15-19)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Benchmark linter (0)
- GitHub Check: Benchmark linter (1)
🔇 Additional comments (6)
crates/oxc_language_server/fixtures/linter/init_nested_configs/deep1/deep2/.oxlintrc.json (1)
1-2: Empty configuration file looks goodThis empty JSON object serves as a test fixture for the nested configuration loading tests.
crates/oxc_language_server/fixtures/linter/init_nested_configs/deep1/.oxlintrc.json (1)
1-2: Empty configuration file looks goodThis empty JSON object serves as a test fixture for the nested configuration loading tests.
crates/oxc_language_server/fixtures/linter/init_nested_configs/.oxlintrc.json (1)
1-2: Empty configuration file looks goodThis empty JSON object serves as a test fixture for the nested configuration loading tests.
crates/oxc_language_server/src/linter/mod.rs (1)
7-7: Visibility change enables test accessMaking the
testermodule public enables the tests to properly import and use theget_file_urihelper function.crates/oxc_language_server/src/worker.rs (2)
462-463: Import added for test utility functionAdding the import for
get_file_uriproperly supports the newly added tests.
493-504: Test correctly verifies disabled nested configs behaviorThis test verifies that when the
disable_nested_configsflag is set to "true", theinit_nested_configsfunction returns an empty map. This is a good test case to ensure the flag properly disables nested config loading.
Merge activity
|
Added tests for the bug in #10698
a60c3fb to
5a709ad
Compare

Added tests for the bug in #10698