Skip to content

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Dec 11, 2025

Found this weird while working on #16479

@Dunqing Dunqing requested a review from camc314 as a code owner December 11, 2025 02:08
Copilot AI review requested due to automatic review settings December 11, 2025 02:08
@github-actions github-actions bot added A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Dec 11, 2025
Copy link
Member Author

Dunqing commented Dec 11, 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
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 handling logic in the prefer_function_type TypeScript linter rule to make it simpler and more concise. The refactoring removes unnecessary intermediate steps while maintaining the same functionality.

Key changes:

  • Simplified comment iteration by using peekable() to check for comments instead of a separate has_comments_between() call
  • Eliminated manual reconstruction of comment delimiters by using the full comment span directly
  • Reduced code from ~30 lines to ~9 lines while preserving identical output

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

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 11, 2025

CodSpeed Performance Report

Merging #16722 will not alter performance

Comparing 12-11-refactor_linter_prefer_function_type_simplify_handling_comments (cf53115) with main (afd6c44)1

Summary

✅ 4 untouched
⏩ 41 skipped2

Footnotes

  1. No successful run was found on main (ef1ef18) during the generation of this report, so afd6c44 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 41 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-11-refactor_linter_prefer_function_type_simplify_handling_comments branch from f2702cb to cf53115 Compare December 11, 2025 02:30
@camchenry camchenry added the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
Copy link
Member

camchenry commented Dec 11, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 12-11-refactor_linter_prefer_function_type_simplify_handling_comments branch from cf53115 to 8034e33 Compare December 11, 2025 05:21
@graphite-app graphite-app bot merged commit 8034e33 into main Dec 11, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 12-11-refactor_linter_prefer_function_type_simplify_handling_comments branch December 11, 2025 05:26
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants