Skip to content

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Aug 22, 2025

fixes #13256

@camc314 camc314 changed the title fix(linter/array-callback-return): false postive with throw expr in callback fix(linter/array-callback-return): false postive with throw stmt in callback Aug 22, 2025
@camc314 camc314 marked this pull request as ready for review August 22, 2025 11:57
Copilot AI review requested due to automatic review settings August 22, 2025 11:57
@github-actions github-actions bot added the A-linter Area - Linter label Aug 22, 2025
Copy link
Contributor Author

camc314 commented Aug 22, 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.

@github-actions github-actions bot added the C-bug Category - Bug label Aug 22, 2025
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

Fixes a false positive in the array-callback-return linter rule where callbacks containing throw statements were incorrectly flagged as missing return statements. The fix recognizes that throw statements provide explicit control flow termination equivalent to return statements.

  • Added handling for throw statements as explicit return status in the return checker
  • Added comprehensive test coverage for throw statement scenarios
  • Added integration test case demonstrating the fix for array callback functions

Reviewed Changes

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

File Description
return_checker.rs Adds throw statement handling and unit tests for the return status checker
mod.rs Adds integration test case for array callback with throw statement

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 22, 2025

CodSpeed Instrumentation Performance Report

Merging #13264 will not alter performance

Comparing c/08-22-fix_linter_array-callback-return_false_postive_with_throw_expr_in_callback (fd14b39) with main (648e939)1

Summary

✅ 34 untouched benchmarks

Footnotes

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

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Aug 22, 2025
Copy link
Contributor Author

camc314 commented Aug 22, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the c/08-22-fix_linter_array-callback-return_false_postive_with_throw_expr_in_callback branch from 8ee748c to fd14b39 Compare August 22, 2025 12:27
@graphite-app graphite-app bot merged commit fd14b39 into main Aug 22, 2025
24 checks passed
@graphite-app graphite-app bot deleted the c/08-22-fix_linter_array-callback-return_false_postive_with_throw_expr_in_callback branch August 22, 2025 12:31
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 22, 2025
This was referenced Aug 26, 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-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: array-callback-return doesn't accept throwing an error

2 participants