Java: Add VS Code model editor queries#14199
Merged
Conversation
aschackmull
reviewed
Sep 22, 2023
aschackmull
reviewed
Sep 22, 2023
Contributor
|
The metadata should be fixed. Otherwise this looks fine, I think. |
aschackmull
previously approved these changes
Sep 25, 2023
Member
Author
|
@aschackmull Thanks for the review! I've made one last change to make it in line with the C# query that splits the |
aschackmull
approved these changes
Sep 25, 2023
Member
Author
|
I can successfully run DCA against these queries and the timings look to be reasonable for most projects. I've created a PR to add a new query suite to DCA: https://github.com/github/codeql-dca/pull/1673 |
3 tasks
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.
This adds two queries that support the CodeQL Model Editor feature in the CodeQL VS Code extension. These queries will be used to retrieve models that can be modeled using MaD. The query results they produce can also be converted to SARIF, hence the static strings in the query.
The
ModelEditor.qllfile's behavior is very similar toExternalApi.qll, but they are used for completely different purposes, and changes to theExternalApi.qlldo not necessarily need to propagate toModelEditor.qll.These queries have been in use for a few weeks now in the VS Code extension (see
java.ts). Using this, we have confirmed that these queries return the results we need. Once these queries are merged and released, we will switch to resolving the queries from the query packs. We will do so based on the tags.