Skip to content

Fix for Superfluous trailing arguments#6

Merged
alxxjohn merged 1 commit into
mainfrom
finding-autofix-1
Jun 16, 2026
Merged

Fix for Superfluous trailing arguments#6
alxxjohn merged 1 commit into
mainfrom
finding-autofix-1

Conversation

@alxxjohn

Copy link
Copy Markdown
Contributor

To fix this, update the call to isDocumentWrite so it matches the function’s expected arity by removing the extra trailing checker argument.

Best single fix without changing functionality:

  • In internal/codeguard/checks/support/typescript_semantic_runner.js, inside analyzeCallExpression around line 923, change:
    • isDocumentWrite(node.expression, checker)
    • to isDocumentWrite(node.expression)

This preserves runtime behavior (since extra args were ignored) while resolving the CodeQL issue and improving call clarity. No imports, new methods, or definitions are needed.

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>
@alxxjohn
alxxjohn marked this pull request as ready for review June 16, 2026 20:52
@alxxjohn
alxxjohn merged commit a11d07c into main Jun 16, 2026
13 checks passed
@alxxjohn
alxxjohn deleted the finding-autofix-1 branch June 16, 2026 20:55
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