fix(hooks): remove unused local variables flagged by CodeQL#2352
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2352 +/- ##
==========================================
- Coverage 81.63% 81.61% -0.03%
==========================================
Files 130 130
Lines 19489 19489
Branches 12 12
==========================================
- Hits 15909 15905 -4
- Misses 3577 3581 +4
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
agreaves-ms
approved these changes
Jul 2, 2026
Contributor
Eval Execution |
jkim323
approved these changes
Jul 2, 2026
This was referenced Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
CodeQL code scanning flagged three
js/unused-local-variablealerts (severity: note) for dead-code locals that were declared but never referenced. This PR removes them, clearing the alerts without changing any runtime behavior.The changes span two files:
colsconstant in therenderHeatmapfunction of .github/hooks/shared/telemetry/report.html. The grid layout already derives its column count directly fromtools.length, socolswas never read.headingThresholdandsubtitleThresholdlocals in the homepage-hero contrast test in docs/docusaurus/e2e/contrast.spec.ts. That test asserts on gradient/nullbackground handling rather than numeric thresholds, so the two values were orphaned. Removing them also left theisLargeTexthelper with no callers, so it was removed as well to avoid trading one dead-code alert for another.Related Issue(s)
Closes #2351
Type of Change
Select all that apply:
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
prompt-builderagent and addressed all feedback.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md).github/skills/*/SKILL.md).github/hooks/*/*.json)evals/)Other:
.ps1,.sh,.py)Testing
cols,headingThreshold,subtitleThreshold,isLargeText) have no remaining references in their files; the survivingcolsoccurrences belong to a separate table renderer and were left untouched.Checklist
Required Checks
AI Artifact Contributions
/prompt-analyzeto review contributionprompt-builderreviewRequired Automated Checks
The following validation commands must pass before merging:
npm run lint:mdnpm run spell-checknpm run lint:frontmatternpm run validate:skillsnpm run lint:md-linksnpm run lint:psnpm run eval:lint:schemanpm run plugin:generatenpm run docs:testSecurity Considerations
Additional Notes
Scope was deliberately limited to the CodeQL
js/unused-local-variablealerts. Two open Scorecard alerts —PinnedDependenciesIDon beval.yml andBranchProtectionID— were intentionally left out of this change.