Skip to content

refactor(linter/prefer-const): use Scoping::scope_is_descendant_of API#23273

Merged
graphite-app[bot] merged 1 commit into
mainfrom
codex/prefer-const-scope-descendant
Jun 11, 2026
Merged

refactor(linter/prefer-const): use Scoping::scope_is_descendant_of API#23273
graphite-app[bot] merged 1 commit into
mainfrom
codex/prefer-const-scope-descendant

Conversation

@camc314

@camc314 camc314 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Make use of Scoping::scope_is_descendant_of introduced in #22313 for prefer-const control-flow scope checks.

These call sites already checked whether a symbol scope was a proper descendant of a loop or control-flow scope, so this delegates that logic to the shared scoping API without changing behavior.

@github-actions github-actions Bot added the A-linter Area - Linter label Jun 11, 2026
@camc314 camc314 self-assigned this Jun 11, 2026
@camc314 camc314 marked this pull request as ready for review June 11, 2026 10:00
Copilot AI review requested due to automatic review settings June 11, 2026 10:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@camc314 camc314 changed the title refactor(linter/prefer-const): use scope descendant API refactor(linter/prefer-const): use Scoping::scope_is_descendant_of API Jun 11, 2026

@camc314 camc314 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is so much nicer 🙂

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jun 11, 2026

camc314 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

@codspeed-hq

codspeed-hq Bot commented Jun 11, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 5 untouched benchmarks
⏩ 66 skipped benchmarks1


Comparing codex/prefer-const-scope-descendant (319e35e) with main (58747a3)2

Open in CodSpeed

Footnotes

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

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

…API (#23273)

Make use of `Scoping::scope_is_descendant_of` introduced in #22313 for `prefer-const` control-flow scope checks.

These call sites already checked whether a symbol scope was a proper descendant of a loop or control-flow scope, so this delegates that logic to the shared scoping API without changing behavior.
@graphite-app graphite-app Bot force-pushed the codex/prefer-const-scope-descendant branch from 319e35e to cc4035a Compare June 11, 2026 10:06
@graphite-app graphite-app Bot merged commit cc4035a into main Jun 11, 2026
29 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Jun 11, 2026
@graphite-app graphite-app Bot deleted the codex/prefer-const-scope-descendant branch June 11, 2026 10:11
camc314 added a commit that referenced this pull request Jul 3, 2026
…API (#23273)

Make use of `Scoping::scope_is_descendant_of` introduced in #22313 for `prefer-const` control-flow scope checks.

These call sites already checked whether a symbol scope was a proper descendant of a loop or control-flow scope, so this delegates that logic to the shared scoping API without changing behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants