Skip to content

Fix for Useless assignment to local variable#80

Merged
KrisPowers merged 3 commits into
mainfrom
finding-autofix-5987efce
May 12, 2026
Merged

Fix for Useless assignment to local variable#80
KrisPowers merged 3 commits into
mainfrom
finding-autofix-5987efce

Conversation

@KrisPowers

Copy link
Copy Markdown
Member

The best fix is to eliminate the unnecessary initial assignment and compute limit in one step, preserving existing behavior and benchmark intent.

In benchmark/bench-throttle.js, inside the “Policy Evaluation” benchmark callback (around lines 186–193), replace the let limit = 100; if (...) { ... } else if (...) { ... } block with a single const limit = ... ? ... : ... expression. To ensure the computed value is actually used (and avoid further dead-store findings), return limit from the callback, consistent with other benchmark callbacks that return computed values.

No new imports, helper methods, or external dependencies are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

Version Fix for Useless assignment to local variable Release

All Commits

  • [d2a1d97] - Fix for Useless assignment to local variable (2026-05-12)
  • [1ffd83f] - Merge branch 'main' into finding-autofix-5987efce (2026-05-12)
  • [587cdd1] - Potential fix for pull request finding 'Useless assignment to local variable' (2026-05-12)

📥 Download Changelog

Last updated: 2026-05-12T22:27:32Z

@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

🔄 Submodule Sync Check

All submodules are up to date!


Automated check · Runs on PR updates

@github-actions github-actions Bot deployed to preview-d2a1d97 May 12, 2026 20:38 Active
@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

🔍 Release Integrity Verification

Test Suite Status
Unit Tests
⏭️ Success
Integration Tests
⏭️ Success
Database Adapters
⏭️ Success
Preview Deploy
⏭️ Success

⚠️ Failures Detected

❌ Unit Test Failures

   ❌ Failed: 0

❌ Integration Test Failures

   ❌ Failed: 0

Commit: fd368e8View full run

@KrisPowers KrisPowers marked this pull request as ready for review May 12, 2026 20:46
@github-actions github-actions Bot deployed to preview-1ffd83f May 12, 2026 20:48 Active
Comment thread benchmark/bench-throttle.js Fixed
…ariable'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@github-actions github-actions Bot deployed to preview-587cdd1 May 12, 2026 22:28 Active
@KrisPowers KrisPowers merged commit 435a7a5 into main May 12, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant