Skip to content
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

Add language to local query history items #2892

Merged
merged 5 commits into from
Oct 3, 2023
Merged

Conversation

starcke
Copy link
Contributor

@starcke starcke commented Sep 29, 2023

This adds language to local query history items, similar to what variant analysis items have (see #2894 for implementation draft on top of this). Note that old history items wont have this field so we have to handle undefined language.
I havent touched the DTOs and mappers before so I was not sure whether I need to do more to make it work.

Few notes:

  1. I added it to DatabaseInfo based on @shati-patel's suggestion. But I think we are open to other places as well.
  2. I moved things related to QueryLanguage from the variant analysis mappers and DTOs to the general mappers and DTOs.
  3. I added the option to show the language in the history item as that was nice for testing and it possibly seems useful. I am happy to remove that again.

To test I ran VSCode with a custom format:

"codeQL.queryHistory.format": "%q on %d (%l) - %s %r [%t]",`

and ran an extra local query:
Screenshot from 2023-09-29 12-14-02

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@starcke starcke marked this pull request as ready for review September 29, 2023 11:40
@starcke starcke requested a review from a team as a code owner September 29, 2023 11:40
@starcke
Copy link
Contributor Author

starcke commented Oct 2, 2023

is codeQL.queryHistory.format actually user-facing, and if it is then I should probably add a CHANGELOG entry?

@adityasharad
Copy link
Contributor

Change note would be great! We didn't mention it in the changelog when this feature was first introduced, but there is at least one changelog entry for a subsequent improvement to the format.

@starcke
Copy link
Contributor Author

starcke commented Oct 3, 2023

Added changelog entry

@starcke starcke merged commit ff34079 into main Oct 3, 2023
@starcke starcke deleted the starcke/local-query-lang-dto branch October 3, 2023 11:53
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.

3 participants