Skip to content

Conversation

asgerf
Copy link
Contributor

@asgerf asgerf commented Sep 4, 2025

Removes a dependency that is problematic for overlay locality. String literals were in fact already SourceNodes so this was mostly redundant. but we do need to treat template literals as SourceNodes as well

@Copilot Copilot AI review requested due to automatic review settings September 4, 2025 07:40
@github-actions github-actions bot added the JS label Sep 4, 2025
Copilot

This comment was marked as outdated.

@asgerf asgerf added the no-change-note-required This PR does not need a change note label Sep 4, 2025
String literals are already SourceNodes. But we need to add template literals as well
@asgerf asgerf force-pushed the js/remove-angularjs-string-special-case branch from b563681 to 5b0ef40 Compare September 4, 2025 09:06
@Copilot Copilot AI review requested due to automatic review settings September 4, 2025 11:59
Copy link
Contributor

@Copilot 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

This PR removes special handling for string literals in AngularJS code by eliminating a custom TrackStringsInAngularCode class that was redundant since string literals were already tracked as SourceNodes. The change ensures template literals are properly treated as source nodes across all JavaScript code.

  • Removes the TrackStringsInAngularCode class and associated helper predicates from AngularJS core
  • Adds TemplateLiteral to the main SourceNode::Range implementation to ensure consistent tracking
  • Updates test expectations to reflect template literals now being properly recognized as source nodes

Reviewed Changes

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

File Description
javascript/ql/lib/semmle/javascript/frameworks/AngularJS/AngularJSCore.qll Removes custom string tracking class and helper predicates that were redundant
javascript/ql/lib/semmle/javascript/dataflow/Sources.qll Adds TemplateLiteral to the main SourceNode implementation
javascript/ql/test/library-tests/DataFlow/tests.expected Updates test expectations to include template literals as tracked source nodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JS no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant