Skip to content

test(linter/plugins): allow filtering by rule or test case in conformance tester#16659

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-09-test_linter_plugins_allow_filtering_by_rule_or_test_case_in_conformance_tester
Dec 9, 2025
Merged

test(linter/plugins): allow filtering by rule or test case in conformance tester#16659
graphite-app[bot] merged 1 commit intomainfrom
12-09-test_linter_plugins_allow_filtering_by_rule_or_test_case_in_conformance_tester

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Dec 9, 2025

Add ability to filter tests in the conformance tester. This is useful while debugging specific test cases.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Dec 9, 2025
Copy link
Copy Markdown
Member Author

overlookmotel commented Dec 9, 2025


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.

Copy link
Copy Markdown
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 filtering capabilities to the conformance tester to facilitate debugging specific rules or test cases. By setting exported constants in a new filter.ts file, developers can focus testing on a single rule or a specific test case code, significantly improving the debugging experience.

Key Changes

  • Created filter.ts with exported filter constants for rule name and test code
  • Integrated rule-level filtering in test file discovery
  • Implemented test case filtering at the test runner level

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
apps/oxlint/conformance/src/filter.ts Introduces FILTER_ONLY_RULE and FILTER_ONLY_CODE constants for selective test execution
apps/oxlint/conformance/src/run.ts Filters discovered test files based on FILTER_ONLY_RULE before execution
apps/oxlint/conformance/src/rule_tester.ts Overrides run() method to filter valid and invalid test cases by FILTER_ONLY_CODE

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

@overlookmotel overlookmotel self-assigned this Dec 9, 2025
@overlookmotel overlookmotel added the A-linter-plugins Area - Linter JS plugins label Dec 9, 2025
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Dec 9, 2025
@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Dec 9, 2025

Merge activity

…ance tester (#16659)

Add ability to filter tests in the conformance tester. This is useful while debugging specific test cases.
@graphite-app graphite-app bot force-pushed the 12-09-test_linter_plugins_simplify_enabling_eslint_compat_mode_in_conformance_tester branch from 1e9ae6a to f791273 Compare December 9, 2025 18:45
@graphite-app graphite-app bot force-pushed the 12-09-test_linter_plugins_allow_filtering_by_rule_or_test_case_in_conformance_tester branch from c1324c6 to 973a1ba Compare December 9, 2025 18:46
Base automatically changed from 12-09-test_linter_plugins_simplify_enabling_eslint_compat_mode_in_conformance_tester to main December 9, 2025 18:51
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 9, 2025
@graphite-app graphite-app bot merged commit 973a1ba into main Dec 9, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 12-09-test_linter_plugins_allow_filtering_by_rule_or_test_case_in_conformance_tester branch December 9, 2025 18:51
Copilot AI pushed a commit that referenced this pull request Dec 10, 2025
…ance tester (#16659)

Add ability to filter tests in the conformance tester. This is useful while debugging specific test cases.
graphite-app bot pushed a commit that referenced this pull request Dec 10, 2025
#16659 added filtering to the conformance tester. Make the filters more flexible by accepting an array of strings, as well as a single string.
Copilot AI pushed a commit that referenced this pull request Dec 10, 2025
#16659 added filtering to the conformance tester. Make the filters more flexible by accepting an array of strings, as well as a single string.
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…ance tester (oxc-project#16659)

Add ability to filter tests in the conformance tester. This is useful while debugging specific test cases.
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…ect#16692)

oxc-project#16659 added filtering to the conformance tester. Make the filters more flexible by accepting an array of strings, as well as a single string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI 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.

2 participants