-
Notifications
You must be signed in to change notification settings - Fork 189
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 quick eval count to the command palette #2475
Conversation
2f43f5d
to
4b0dd5e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 2 minor points inline.
extensions/ql-vscode/CHANGELOG.md
Outdated
@@ -7,6 +7,7 @@ | |||
- Fix bug where the `CodeQL: Compare Query` command did not work for comparing quick-eval queries. [#2422](https://github.com/github/vscode-codeql/pull/2422) | |||
- Update text of copy and export buttons in variant analysis results view to clarify that they only copy/export the selected/filtered results. [#2427](https://github.com/github/vscode-codeql/pull/2427) | |||
- Add warning when using unsupported CodeQL CLI version. [#2428](https://github.com/github/vscode-codeql/pull/2428) | |||
- Add `CodeQL: Quick Evaluation Count` command to generate the count of the selected item without having to compute locations or strings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: do you think it would be better to include a reason why someone would want to use htis instead of standard quick eval (ie- to save computation time)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps also some wording like "statistics" or "the number of results produced by the selected logic" so it's more obvious what the count is?
async (progress, token) => { | ||
if (!(await this.cliServer.cliConstraints.supportsQuickEvalCount())) { | ||
throw new Error( | ||
"Quick evaluation counts is not supported by this version of CodeQL CLI.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Quick evaluation counts is not supported by this version of CodeQL CLI.", | |
`Quick evaluation counts is only supported by CodeQL CLI v${CliVersionConstraint.CLI_VERSION_WITH_QUICK_EVAL_COUNT} or later.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"count is" or "counts are"
4b0dd5e
to
86c9ec7
Compare
edc3b84
to
bbeb93b
Compare
This allows using quick-eval-count via the command palette. Quick eval count generates column counts and overall count of the results instead of generating locations and strings. As generating locations and strings can be expensive and the number of results is often more useful this can shave time off debugging complex queries. As this is fairly advanced and to avoid cluttering the context menu I have not added a context menu. We can revisit this in future.
@dbartol I am leaving it to you to decide how to integrate this into the debugging workflow. This should probably be treated like a quick-eval option there.
Checklist
ready-for-doc-review
label there.