Skip to content

refactor(oxlint): move --init logic into a own file#18505

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-24-refactor_oxlint_move_--init_logic_into_a_own_file
Jan 25, 2026
Merged

refactor(oxlint): move --init logic into a own file#18505
graphite-app[bot] merged 1 commit intomainfrom
01-24-refactor_oxlint_move_--init_logic_into_a_own_file

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Jan 24, 2026

No description provided.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 24, 2026
Copy link
Member Author

Sysix commented Jan 24, 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-24-refactor_oxlint_move_--init_logic_into_a_own_file branch 2 times, most recently from 5af01c4 to a0e9027 Compare January 24, 2026 20:31
@Sysix Sysix requested a review from Copilot January 24, 2026 21:42
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 refactors the --init command logic by extracting it from the main lint.rs file into a dedicated mode/init.rs module, improving code organization and separation of concerns.

Changes:

  • Created a new mode module with init.rs containing the --init command logic
  • Moved the config file initialization logic out of the main linting flow
  • Simplified the --init flow to use Oxlintrc::default() directly instead of processing through the config builder

Reviewed changes

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

File Description
apps/oxlint/src/mode/mod.rs New module file declaring and exporting the init submodule
apps/oxlint/src/mode/init.rs New file containing the extracted run_init function with config file initialization logic
apps/oxlint/src/lint.rs Removed --init logic and unused imports (fs, serde_json::Value), added early return for init command
apps/oxlint/src/lib.rs Registered the new mode module

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

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
Copy link
Contributor

camc314 commented Jan 25, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the 01-24-refactor_oxlint_move_--init_logic_into_a_own_file branch from a0e9027 to 119f566 Compare January 25, 2026 16:24
@graphite-app graphite-app bot merged commit 119f566 into main Jan 25, 2026
19 checks passed
@graphite-app graphite-app bot deleted the 01-24-refactor_oxlint_move_--init_logic_into_a_own_file branch January 25, 2026 16:30
@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