Skip to content

Java: Restrict results to source literals. #20054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2025

Conversation

aschackmull
Copy link
Contributor

Some literals extracted from .class files can contain many control chars, which can cause this query to blow up. Those results are pretty useless, so we can simply exclude them.

@Copilot Copilot AI review requested due to automatic review settings July 15, 2025 12:56
@aschackmull aschackmull added the no-change-note-required This PR does not need a change note label Jul 15, 2025
@aschackmull aschackmull requested a review from a team as a code owner July 15, 2025 12:56
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 restricts a CodeQL query to only analyze source literals rather than compiled bytecode literals. The change addresses performance issues caused by literals extracted from .class files that contain many control characters, which can cause the query to become inefficient while providing limited value.

  • Adds a filter to restrict analysis to source compilation units only
  • Adds documentation explaining why Kotlin files are excluded to prevent false positives

@github-actions github-actions bot added the Java label Jul 15, 2025
@aschackmull aschackmull merged commit b13f118 into github:main Jul 15, 2025
18 checks passed
@aschackmull aschackmull deleted the java/fixup-control-char-query branch July 15, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java 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.

2 participants