Skip to content

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Dec 4, 2025

Remove useless code only

@github-actions github-actions bot added A-formatter Area - Formatter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Dec 4, 2025
Copy link
Member Author

Dunqing commented Dec 4, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 4, 2025

CodSpeed Performance Report

Merging #16488 will not alter performance

Comparing 12-04-refactor_formatter_remove_useless_code_in_comment_printing (289f56e) with main (a607cc4)

Summary

✅ 38 untouched
⏩ 7 skipped1

Footnotes

  1. 7 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.

@Dunqing Dunqing force-pushed the 12-04-refactor_formatter_remove_useless_code_in_comment_printing branch from 036efbe to 289f56e Compare December 5, 2025 06:40
@Dunqing Dunqing marked this pull request as ready for review December 5, 2025 07:43
Copilot AI review requested due to automatic review settings December 5, 2025 07:43
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 comment printing logic in the formatter by removing unused code. The changes simplify the implementation of multiline comment formatting without affecting functionality.

  • Removed unused source_offset variable that was being tracked but never read
  • Removed unnecessary format_once wrapper around a simple for loop
  • Removed associated lint suppression for cast_possible_truncation that was only needed for the removed code

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 6, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 12-04-refactor_formatter_remove_useless_code_in_comment_printing branch from 289f56e to fd33a4d Compare December 6, 2025 15:29
@graphite-app graphite-app bot merged commit fd33a4d into main Dec 6, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 12-04-refactor_formatter_remove_useless_code_in_comment_printing branch December 6, 2025 15:34
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 6, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-formatter Area - Formatter 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