Skip to content

refactor(oxlint): OutputFormatter.all_rules accept enabled rules and simplify run_rules logic#18517

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-25-refactor_oxlint_outputformatter.all_rules_accept_enabled_rules_and_simplify_run_rules_logic
Jan 25, 2026
Merged

refactor(oxlint): OutputFormatter.all_rules accept enabled rules and simplify run_rules logic#18517
graphite-app[bot] merged 1 commit intomainfrom
01-25-refactor_oxlint_outputformatter.all_rules_accept_enabled_rules_and_simplify_run_rules_logic

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Jan 25, 2026

No description provided.

Copy link
Member Author

Sysix commented Jan 25, 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.

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

Refactors oxlint --rules output generation by passing the resolved “enabled rules” set into the output formatter, allowing the Default formatter to render a CLI-specific table (with an Enabled column) while simplifying run_rules.

Changes:

  • Changed InternalFormatter::all_rules / OutputFormatter::all_rules to accept a set of enabled rule names.
  • Moved the CLI table rendering for --rules into DefaultOutputFormatter via render_markdown_table_cli.
  • Simplified mode::run_rules by removing OutputFormat branching and delegating to the formatter; updated call sites accordingly.

Reviewed changes

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

Show a summary per file
File Description
apps/oxlint/src/output_formatter/mod.rs Updates formatter API to accept enabled rules when listing all rules.
apps/oxlint/src/output_formatter/json.rs Adapts JSON formatter to new all_rules signature (enabled set currently unused).
apps/oxlint/src/output_formatter/default.rs Renders CLI rules table with enabled-state awareness based on passed rule set.
apps/oxlint/src/mode/rules.rs Simplifies --rules mode to compute enabled rules and delegate to formatter.
apps/oxlint/src/lint.rs Updates run_rules invocation after signature change.
apps/oxlint/src/lib.rs Updates get_all_rules_json() to call all_rules with an empty enabled set.

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

@Sysix Sysix force-pushed the 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file branch from e4d044e to a09ba38 Compare January 25, 2026 12:46
@Sysix Sysix force-pushed the 01-25-refactor_oxlint_outputformatter.all_rules_accept_enabled_rules_and_simplify_run_rules_logic branch from 5468a31 to 1af9cd8 Compare January 25, 2026 12:46
@Sysix Sysix marked this pull request as ready for review January 25, 2026 12:47
@Sysix Sysix requested a review from camc314 as a code owner January 25, 2026 12:47
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@camc314 camc314 self-assigned this Jan 25, 2026
Copy link
Contributor

camc314 commented Jan 25, 2026

Merge activity

  • Jan 25, 4:32 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 25, 4:37 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Jan 25, 5:04 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #18515.
  • Jan 25, 5:04 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #18515.
  • Jan 25, 5:04 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 25, 5:04 PM UTC: The merge label '0-merge' was removed. This PR will no longer be merged by the Graphite merge queue
  • Jan 25, 5:08 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 25, 5:10 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Jan 25, 5:36 PM UTC: The Graphite merge queue removed this pull request due to removal of a downstack PR #18516.
  • Jan 25, 5:36 PM UTC: camc314 removed this pull request from the Graphite merge queue.
  • Jan 25, 6:17 PM UTC: The merge label '0-merge' was removed. This PR will no longer be merged by the Graphite merge queue
  • Jan 25, 6:17 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 25, 6:24 PM UTC: graphite-app added this pull request to the Graphite merge queue.
  • Jan 25, 6:25 PM UTC: Merged by the Graphite merge queue.

@graphite-app graphite-app bot force-pushed the 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file branch from a09ba38 to fda5497 Compare January 25, 2026 16:39
graphite-app bot pushed a commit that referenced this pull request Jan 25, 2026
@graphite-app graphite-app bot force-pushed the 01-25-refactor_oxlint_outputformatter.all_rules_accept_enabled_rules_and_simplify_run_rules_logic branch from 1af9cd8 to a7704b5 Compare January 25, 2026 16:40
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@Sysix Sysix added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
camc314 pushed a commit that referenced this pull request Jan 25, 2026
@camc314 camc314 force-pushed the 01-25-refactor_oxlint_outputformatter.all_rules_accept_enabled_rules_and_simplify_run_rules_logic branch from a7704b5 to 99b9c91 Compare January 25, 2026 17:04
@camc314 camc314 force-pushed the 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file branch from fda5497 to ade5c23 Compare January 25, 2026 17:04
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@graphite-app graphite-app bot force-pushed the 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file branch from ade5c23 to 950cc78 Compare January 25, 2026 17:12
graphite-app bot pushed a commit that referenced this pull request Jan 25, 2026
@graphite-app graphite-app bot force-pushed the 01-25-refactor_oxlint_outputformatter.all_rules_accept_enabled_rules_and_simplify_run_rules_logic branch from 99b9c91 to bfb4985 Compare January 25, 2026 17:12
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@graphite-app graphite-app bot changed the base branch from 01-25-refactor_oxlint_move_--rules_logic_into_a_own_file to graphite-base/18517 January 25, 2026 18:09
graphite-app bot pushed a commit that referenced this pull request Jan 25, 2026
@graphite-app graphite-app bot force-pushed the graphite-base/18517 branch from 950cc78 to abfd075 Compare January 25, 2026 18:16
@graphite-app graphite-app bot force-pushed the 01-25-refactor_oxlint_outputformatter.all_rules_accept_enabled_rules_and_simplify_run_rules_logic branch from bfb4985 to fbb10a6 Compare January 25, 2026 18:16
@graphite-app graphite-app bot changed the base branch from graphite-base/18517 to main January 25, 2026 18:16
@graphite-app graphite-app bot force-pushed the 01-25-refactor_oxlint_outputformatter.all_rules_accept_enabled_rules_and_simplify_run_rules_logic branch from fbb10a6 to 56fc91f Compare January 25, 2026 18:17
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@graphite-app graphite-app bot merged commit 56fc91f into main Jan 25, 2026
19 checks passed
@graphite-app graphite-app bot deleted the 01-25-refactor_oxlint_outputformatter.all_rules_accept_enabled_rules_and_simplify_run_rules_logic branch January 25, 2026 18:25
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
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 C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments