Ruby keyword arguments are represented differently than positional
arguments in the MaD format: they are represented as `Method[key:]`. The
framework endpoints query also returns the name as `key:`, so we can
detect these and format them as such.
This moves the creation of possible method argument options from the
view to the languages. This allows differentiating between the
languages, for example by using `Argument[self]` for Ruby instead of
`Argument[this]`.
This removes the `disabled` prop from the `Dropdown` component. This is
already included in the default HTML props of the `select` component,
so it's not necessary to add it again.
This prevents the creation of duplicate query pack names when creating a
query in the following ways:
- When you have selected a folder, the query pack name will include the
name of the folder. This should prevent duplicate query pack names
when creating queries in different folders.
- When the folder name includes `codeql` or `queries`, we will not
add `codeql-extra-queries-` since that would be redundant.
- After generating the query pack name, we will resolve all qlpacks and
check if one with this name already exists. If it does, we will start
adding an index to the name until we find a unique name.
This will change the skeleton query wizard to detect existing query
packs when creating a skeleton query. This allows the user to create a
query in an existing query pack that is not named
`codeql-custom-queries-{language}`.
This fixes a bug where the method row would not scroll into view when
revealing a method. The problem was that the `DataGridRow` component
on which the `ref` was set is a `display: contents` element, which
does not have a visual representation in the DOM. Therefore, it wasn't
possible to scroll the method row into view. This fixes it by moving
the ref to the `DataGridCell` component of the first column, which is
a normal element.
We shouldn't be directly using the `extLogger` if we have access to the
app logger (either directly or by passing it in as a parameter). This
removes all imports of `extLogger` from the model editor directory.
This adds the ability to generate Ruby models from a database. It uses
the `GenerateModel.ql` query to do this. The query will essentially
return data in the data extensions format, so this will just parse it
and return it as `ModeledMethod` objects.
This adds the current version of the queries for Ruby to the model
editor included queries. This makes it work without needing to check out
a separate branch of the CodeQL repository/submodule. I've removed most
commented out code from the queries, but the other parts should match.
This only makes Ruby available in the model editor when the following
is set in the settings.json (workspace or user) file:
```json5
{
"codeQL.model.enableRuby": true,
}
```
Make the minimum changes necessary for prototype Ruby support in the
model editor.
This consists of:
- Reading/writing modelled methods from/to data extensions in the
dynamic languages format
- Special-casing Ruby in a few places where Java/C# was previously
assumed.
This will use the MaD's definition of a method signature when decoding
BQRS files. This will allow us to change the method signature definition
for dynamic languages.
Before, if you had selected a folder or file within for example
`codeql-custom-queries-java` and selected `java` as the language, it
would create a nested folder within `codeql-custom-queries-java` with
the name `codeql-custom-queries-java`. This is unexpected for the user,
who would expect a new query to be created within
`codeql-custom-queries-java`. This fixes that by checking for this
specific condition. It does not fix it for all scenarios, such as where
the selected file/folder is nested multiple levels deep within the
`codeql-custom-queries-java` folder.
This will change the behavior of the "Create new query" command to
create the new query in the same folder as the first selected item in
the queries panel. If no items are selected, the behavior is the same
as before.
I've used events to communicate the selection from the queries panel to
the local queries module. This is some more code and some extra
complexity, but it ensures that we don't have a dependency from the
local queries module to the queries panel module. This makes testing
easier.
This changes the skeleton query wizard to not prompt for database
download after creating a query by default. Instead, it will show a
message with a button to download a database which will launch the same
prompt.
This will change the "Create new query" command to use the selected
language when creating a new query. If no language is selected, it will
still prompt the user to pick a language.
When calling for example `showAndLogExceptionWithTelemetry`, the stack
trace would be sent to Application Insights, but there was no way to
see the stack trace from within VS Code. This will add the stack trace
to the log by returning it from `fullMessageWithStack` and using it in
the appropriate places.
It is possible to open the model editor without opening a folder, but
this gave an unhelpful error message. This commit adds a more helpful
error message.
When a local query fails (for example, if it is cancelled), it may still
have an evaluation log. We weren't generating evaluation log summaries
in these cases, so the options to view the summary text and to use the
evaluation log viewer would not be available. This fixes it by also
trying to generate the summary in the case of a failed query.
This will ensure that when "Show Evaluator Log (Raw JSON)" is used on a
cancelled query history item, we will still show it if it exists. This
changes the error messages on other cases to be more specific.
This will add the `QueryOutputDir` to the `InitialQueryInfo` and
populate it when creating a local query history item. This will allow us
to open the results directory or show the evaluator log without a
completed query.
This changes the usage data provider tree items to keep a reference to
the method and usage instead of only including their properties in the
tree item. This makes it easier to find the original method and usage
when revealing an item in the tree. It also removes the `getParent` call
in `getTreeItem`.
The main reason for this fix is to ensure
`codeQLModelEditor.jumpToMethod` gets the correct `usage` argument.
It received the tree item before, but now we can actually pass the
usage that was clicked on.
When the GitHub API returns an error for a missing default branch, we
will now show a custom error message. This custom error message includes
a link to the page to create the branch. The error is detected using the
`errors` field on the response that is now being returned.
This makes it possible to decode source maps containing references to
code that is not part of the extension. If it finds any such references,
it will simply not decode the source map and use the original stack
trace instead.
`logFileLocation` was not set after a query finishes running. I don't
know when this bug was introduced. I think it goes as far back as
the refactor to remove the old query server.
This creates new tree item types for methods and usages such that these
can contain references to their parent and children. This allows us to
easily find the parent of a usage and to find the children of a method.
This removes an expensive `find` call in `getParent`.
When opening a library group in the model editor, unmodeled methods
would always be marked as unsaved, even if there were no changes. This
was because the `ModelKindDropdown` component did not properly take into
account that the `kind` for an unmodeled method should be an empty
string. It would always try setting it to `undefined`, which would cause
the method to be marked as unsaved. This fixes it by checking if there
are valid kinds before setting the kind to the first one.
This improves the immutability of the modeling store state by using
TypeScript's readonly types to ensure that state can only be modified
from within the modeling store or when it's copied. This mostly consists
of adding `readonly` to properties and arrays, but this also adds a
`DeepReadonly` type to use in `postMessage` arguments to ensure that
readonly objects can be passed in. `postMessage` will never modify the
objects, so this is safe.
The purpose of this change is to add a command that clears the cache except for predicates marked `cached`.
In contrast, the existing "VSCode: Clear Cache" command clears everything (`--mode=brutal`).
This calls into the query server's `evaluation/trimCache` method;
however, its existing behaviour is to do a database cleanup with `--mode=gentle`.
This is not well documented, and `--mode=normal` would give the desired behaviour.
Accordingly, this approach is dependent on separately changing the backend behaviour to `--mode=normal`.
Other possible amendments to this commit would be to not touch the legacy client
(replacing required methods by failing promises, since the legacy server is fully deprecated already),
or to have less duplication (by introducing more arguments — however,
I'm applying the rule of thumb that >3 copy-pastes are required for the introduction of a deduplicating abstraction).
This fixes a bug where the validation of modeled methods would not
consider the kind of the modeled method, and would therefore give an
error when there was e.g. a neutral sink and a non-neutral summary.
When using the "CodeQL: Install pack dependencies" command, we would
show packs that are located in the package cache or distribution. Since
there are no dependencies to install for these packs, these options are
not useful.
This will filter out any packs that are not in the workspace folders
when showing the quick pick. This should exclude most packs if you are
in a workspace without the `codeql` submodule and should be a lot more
intuitive in those cases. If you are in a workspace with the `codeql`
submodule, it will still show all the packs.
This will change the add button in the method modeling panel to only be
disabled if there is exactly 1 unmodeled method and there are no
unmodeled methods. This should be more intuitive for users since they
are able to see in 1 screen that there is an unmodeled method.
This will respect the user's `saveBeforeStart` setting when running a
variant analysis. This re-uses the existing `saveBeforeStart` function
that is used when running local queries. The default behavior if the
setting is not set is to save all open named files.
This sorts the methods in the methods usages panel the same as in the
model editor. Since this is dependent on the mode, we need to keep track
of the mode in the modeling store, so this also adds a mode field to the
db state.
This fixes three bugs related to the modeling store and view states:
- In the model editor view, when `setModeledMethods` was called, it
would do it on the active database, instead of the database that the
view was showing. This should not result in any visible bugs since the
active database is always the one that is being shown (in theory), but
I can imagine that it could cause issues if showing multiple model
editors next to each other.
- In the method modeling panel, the "reveal in editor" button would
always show the already active model editor. Therefore, if you had
multiple open and were still viewing the method of the first one, it
would always show the second one.
- In the method modeling panel, the same bug would cause the incorrect
modeled methods to be updated.
When selecting a method that has no modeled methods, the modeling state
would not contain an entry for the method signature. This would cause
the `modeledMethods` to be `undefined`, which is not allowed according
to its type.
This change sets the `fullMessage` of the
`showAndLogExceptionWithTelemetry` to include the stack trace. This
makes it possible to find the source of the error rather than only
knowing that a specific error occurred. If the error does not have a
stack trace (which should be rare) the message will be the same as
before.
This converts all remaining extension host code to handle multiple
models per method. The only place where we're using the legacy format
is in the webview and in the boundary between the webview and the
extension host.
This switches all places where we're retrieving some model configuration
to use the `ModelConfig` or `ModelConfigListener` types. This makes it
much easier to mock these settings in tests.
This also adds a listener to the `ModelEditorView` to send the new view
state when any of the settings is changed. This should make it easier
to test settings changes in the model editor without having to re-open
the model editor.
This updates the method modeling panel's view state when the
`codeQL.model.showMultipleModels` setting changes. This will ensure that
the setting updates without needing to restart VS Code since this view
is much harder to restart than the model editor.
This adds a view state to the method modeling panel similar to the
model editor. This will be used to send the state of the show multiple
models feature flag to the webview so this can be used to selectively
show/hide components in the method modeling panel.
This will change the input/output types for modeled methods in the
`modeled-method-fs.ts` file to take in multiple models per method. This
removes the need for conversion functions between this file and
`yaml.ts` files. Instead, the conversion functions are done when calling
any functions defined in `modeled-method-fs.ts` files.
This changes YAML parsing/creating functions for the model editor to
handle multiple models per method. The changes in the actual YAML
handling are fairly small because the format itself already supports
multiple models per method.
I've introduced a few helper functions to convert between the old and
new types. This should only be necessary while we're in the middle of
the transition to the new types and can be removed later. For now,
we'll just take the first model in the array when converting from the
new to the old type. This is a change in the behavior since currently
we always take the last model in the array but this behavior is
undocumented and unsupported, so it should be fine to change it.
Use it for `MultiCancellationToken`. And ensure that adding a
cancellation requested listener to the `MultiCancellationToken` will
forward any cancellation requests to all constituent tokens.
This will reveal a method for which "Review in editor" is clicked in the
model editor view: it will expand the group (library/package) in which
the method is located, scroll to the method, and highlight the method.
If the user clicks anywhere on the page, the highlight will be removed,
but the group will remain expanded.
This will call a method on the correct model editor view when the user
clicks on "Review in editor". This does not yet do anything to the view;
this will be added in a follow-up commit.
This is used for registering which model editor views are currently
active. This will be used to determine which view to send the "reveal
method" command to. It can also be used in the future to limit the
number of instances of the model editor that can be opened for a
database.
This uses the same pattern as variant analyses with a separate interface
for the view to avoid having circular dependencies.
This is a cancellation token that cancels when any of its constituent
cancellation tokens are cancelled.
This token is used to fix a bug in Find Definitions. Previously, when
clicking `CTRL` (or `CMD` on macs) inside a source file in an archive
and hovering over a token, this will automatically invoke the
definitions finder (in preparation for navigating to the definition).
The only way to cancel is to move down to the message popup and click
cancel there.
However, this is a bug. What _should_ happen is that if a user moves
their mouse away from the token, the operation should cancel.
The underlying problem is that the extension was only listening to the
cancellation token from inside `getLocationsForUriString` the
cancellation token used by the Language Server protocol to cancel
operations in flight was being ignored.
This fix will ensure we are listening to _both_ cancellation tokens
and cancel the query if either are cancelled.
This will change the `AbstractWebview` to dispose its tracked objects
(using `this.push`) when the panel is disposed rather than when the
view is disposed. This makes `this.push` actually useful in a view.
Before, the objects would only get disposed when the extension itself
was disposed.
Previously, if there was an explicit restart of the query server (eg-
by changing a configuration setting), then the query server process
would be started twice: once by the `close` handler and once by the
restart command.
By adding the `removeAllListeners` to the dispose method, we ensure that
when the query server shuts down gracefully, there won't be a `close`
listener that is going to restart it a second time if there is a
different way of restarting it.
It seems like Node's native `fetch` implementation isn't quite working
right with Octokit and MSW. This switches to using `node-fetch` like
we're already doing for all other requests (e.g. downloading databases).
This updates the model editor queries to the version that will be merged
into the CodeQL repository. There are some slight changes to the output
format, so we slightly need to change the BQRS decoding of those
queries.
The queries themselves were copied from the two PRs with some minor
additions at the end since these were changes in core CodeQL library
files.
After the upgrade to the correct types for js-yaml, the return type
of `load` is correctly typed as `unknown`. This means that we can't
use the return value directly, but need to validate it first.
This adds such validation by generating a JSON schema for a newly
created typed. The JSON schema generation is very similar to how we do
it in https://github.com/github/codeql-variant-analysis-action.
Before this change and starting with CLI v2.14.3, if you wanted to run
a variant analysis query and the pack it is contained in has at least
one query that contains an extensible predicate, this would be an error.
The reason is that v2.14.3 introduced deep validation for data
extensions. We are not copying the query that contains an extensible
predicate to the synthetic pack we are generating. This means that deep
validation will fail because there will be extensions that target the
missing extensible predicate.
This change avoids the problem by copying any query files that contain
extensible predicates to the synthetic pack. It uses the internal
`generate extensible-predicate-metadata` command to discover which
query files contain extensible predicates and copies them.
* Don't download artifacts for repos with no results
* Remove getVariantAnalysisRepoResult requests for repos with no results
* Run fix-scenario-file-numbering for mrva-problem-query-success scenario
* Update CHANGELOG
When running tests using `--runTestsByPath <some-path>`, the tests were
being run twice because jest-runner-vscode
[resolves test paths](0c98dc12ad/packages/jest-runner-vscode/src/runner.ts (L57-L66)),
while the original arguments were also still passed to Jest. So, the
arguments Jest would receive would look something like
`test/vscode-tests/no-workspace/databases/local-databases/locations.test.ts /Users/koesie10/github/vscode-codeql/extensions/ql-vscode/test/vscode-tests/no-workspace/databases/local-databases/locations.test.ts`
which would cause Jest to run the tests twice. This fixes this by
resolving the paths to their absolute paths, and then removing any
duplicates.
This commit fixes a bug in the extension where the qhelp preview was not
being refreshed after the first time the preview was rendered. The
reason is that vscode will not refresh the markdown preview unless the
original file with the markdown in it is already open in the editor.
This fix will briefly open the raw markdown, refresh the preview and
close the raw markdown.
2023-07-31 16:21:09 -07:00
561 changed files with 31461 additions and 26881 deletions
The CodeQL for VS Code extension defines the version of Node.js that it is intended to run with. This Node.js version is used when running most CI and unit tests.
When running in production (i.e. as an extension for a VS Code application) it will use the Node.js version provided by VS Code. This can mean a different Node.js version is used by different users with different versions of VS Code.
We should make sure the CodeQL for VS Code extension works with the Node.js version supplied by all versions of VS Code that we support.
## Checking the version of Node.js supplied by VS Code
You can find this info by seleting "About Visual Studio Code" from the top menu.

## Updating the Node.js version
The following files will need to be updated:
-`extensions/ql-vscode/.nvmrc` - this will enable nvm to automatically switch to the correct Node
version when you're in the project folder. It will also change the Node version the GitHub Actions
workflows use.
-`extensions/ql-vscode/package.json` - the "engines.node: '[VERSION]'" setting
-`extensions/ql-vscode/package.json` - the "@types/node: '[VERSION]'" dependency
Then run `npm install` to update the `extensions/ql-vscode/package-lock.json` file.
## Node.js version used in tests
Unit tests will use whatever version of Node.js is installed locally. In CI this will be the version specified in the workflow.
Integration tests download a copy of VS Code and then will use whatever version of Node.js is provided by VS Code. Our integration tests are currently pinned to an older version of VS Code. See [VS Code version used in tests](./vscode-version.md#vs-code-version-used-in-tests) for more information.
1. Run the ["Run CLI tests" workflow](https://github.com/github/vscode-codeql/actions/workflows/cli-test.yml) and make sure the tests are green. If there were no merges between the time the workflow ran (it runs daily), and the release, you can skip this step.
1. Double-check the `CHANGELOG.md` contains all desired change comments and has the version to be released with date at the top.
* Go through all recent PRs and make sure they are properly accounted for.
* Make sure all changelog entries have links back to their PR(s) if appropriate.
@@ -10,10 +11,7 @@
* New telemetry events are added.
* Deprecation or removal of commands.
* Accumulation of many changes, none of which are individually big enough to warrant a minor bump, but which together are. This does not include changes which are purely internal to the extension, such as refactoring, or which are only available behind a feature flag.
1. Double-check that the node version we're using matches the one used for VS Code. You can find this info by seleting "About Visual Studio Code" from the top menu. If it doesn't match, you will then need to update the nodeversion in the following files:
*`.nvmrc` - this will enable `nvm` to automatically switch to the correct node version when you're in the project folder
*`.github/workflows/main.yml` - all the "node-version: '[VERSION]'" settings
*`.github/workflows/release.yml` - the "node-version: '[VERSION]'" setting
1. Double-check that the node version we're using matches the one used for VS Code. See the [Node.js version instructions](./node-version.md) for more information.
1. Double-check that the extension `package.json` and `package-lock.json` have the version you intend to release. If you are doing a patch release (as opposed to minor or major version) this should already be correct.
1. Create a PR for this release:
* This PR will contain any missing bits from steps 1, 2 and 3. Most of the time, this will just be updating `CHANGELOG.md` with today's date.
Then, from the `extensions/ql-vscode` directory, use the appropriate command to run the tests:
* Unit tests: `npm run test:unit`
* View Tests: `npm test:view`
* View Tests: `npm run test:view`
* VSCode integration tests: `npm run test:vscode-integration`
#### Running CLI integration tests from the terminal
@@ -48,8 +48,8 @@ Alternatively, you can run the tests inside of VSCode. There are several VSCode
You will need to run tests using a task from inside of VS Code, under the "Run and Debug" view:
* Unit tests: run the _Launch Unit Tests - React_ task
* View Tests: run the _Launch Unit Tests_ task
* Unit tests: run the _Launch Unit Tests_ task
* View Tests: run the _Launch Unit Tests - React_ task
* VSCode integration tests: run the _Launch Unit Tests - No Workspace_ and _Launch Unit Tests - Minimal Workspace_ tasks
#### Running CLI integration tests from VSCode
@@ -133,4 +133,4 @@ Once the scenario has been recorded, it's often useful to remove some of the req
### Scenario data location
Pre-recorded scenarios are stored in `./src/variant-analysis/github-api/mocks/scenarios`. However, it's possible to configure the location, by setting the `codeQL.mockGitHubApiServer.scenariosPath` configuration property in the VS Code user settings.
Pre-recorded scenarios are stored in `./src/common/mock-gh-api/scenarios`. However, it's possible to configure the location, by setting the `codeQL.mockGitHubApiServer.scenariosPath` configuration property in the VS Code user settings.
The CodeQL for VS Code extension specifies the versions of VS Code that it is compatible with. VS Code will only offer to install and upgrade the extension when this version range is satisfied.
## Where is the VS Code version specified
1. Hard limit in [`package.json`](https://github.com/github/vscode-codeql/blob/606bfd7f877d9fffe4ff83b78015ab15f8840b12/extensions/ql-vscode/package.json#L16)
This is the value that VS Code understands and respects. If a user does not meet this version requirement then VS Code will not offer to install the CodeQL for VS Code extension, and if the extension is already installed then it will silently refuse to upgrade the extension.
1. Soft limit in [`extension.ts`](https://github.com/github/vscode-codeql/blob/606bfd7f877d9fffe4ff83b78015ab15f8840b12/extensions/ql-vscode/src/extension.ts#L307)
This value is used internally by the CodeQL for VS Code extension and is used to provide a warning to users without blocking them from installing or upgrading. If the extension detects that this version range is not met it will output a warning message to the user prompting them to upgrade their VS Code version to ge the latest features of CodeQL.
## When to update the VS Code version
Generally we should aim to support as wide a range of VS Code versions as we can, so unless there is a reason to do so we do not update the minimum VS Code version requirement.
Reasons for updating the minimum VS Code version include:
- A new feature is included in VS Code. We may want to ensure that it is available to use so we do not have to provide an alternative code path.
- A breaking change has happened in VS Code, and it is not possible to support both new and old versions.
Also consider what percentage of our users are using each VS Code version. This information is available in our telemetry.
## How to update the VS Code version
To provide a good experience to users, it is recommented to update the `MIN_VERSION` in `extension.ts` first and release, and then update the `vscode` version in `package.json` and release again. By stagging this update across two releases it gives users on older VS Code versions a chance to upgrade before it silently refuses to upgrade them.
## VS Code version used in tests
Our integration tests are currently pinned to use an older version of VS Code due to <https://github.com/github/vscode-codeql/issues/2402>.
This version is specified in [`jest-runner-vscode.config.base.js`](https://github.com/github/vscode-codeql/blob/d93f2b67c84e79737b0ce4bb74e31558b5f5166e/extensions/ql-vscode/test/vscode-tests/jest-runner-vscode.config.base.js#L17).
Until this is resolved this will limit us updating our minimum supported version of VS Code.
- Sorted result set filenames now include a hash of the result set name instead of the full name. [#2955](https://github.com/github/vscode-codeql/pull/2955)
- The "Install Pack Dependencies" will now only list CodeQL packs located in the workspace. [#2960](https://github.com/github/vscode-codeql/pull/2960)
- Fix a bug where the "View Query Log" action for a query history item was not working. [#2984](https://github.com/github/vscode-codeql/pull/2984)
- Add a command to sort items in the databases view by language. [#2993](https://github.com/github/vscode-codeql/pull/2993)
- Fix not being able to open the results directory or evaluator log for a cancelled local query run. [#2996](https://github.com/github/vscode-codeql/pull/2996)
- Fix empty row in alert path when the SARIF location was empty. [#3018](https://github.com/github/vscode-codeql/pull/3018)
## 1.9.2 - 12 October 2023
- Fix a bug where the query to Find Definitions in database source files would not be cancelled appropriately. [#2885](https://github.com/github/vscode-codeql/pull/2885)
- It is now possible to show the language of query history items using the `%l` specifier in the `codeQL.queryHistory.format` setting. Note that this only works for queries run after this upgrade, and older items will show `unknown` as a language. [#2892](https://github.com/github/vscode-codeql/pull/2892)
- Increase the required version of VS Code to 1.82.0. [#2877](https://github.com/github/vscode-codeql/pull/2877)
- Fix a bug where the query server was restarted twice after configuration changes. [#2884](https://github.com/github/vscode-codeql/pull/2884).
- Add support for the `telemetry.telemetryLevel` setting. For more information, see the [telemetry documentation](https://codeql.github.com/docs/codeql-for-visual-studio-code/about-telemetry-in-codeql-for-visual-studio-code). [#2824](https://github.com/github/vscode-codeql/pull/2824).
- Add a "CodeQL: Trim Cache" command that clears the evaluation cache of a database except for predicates annotated with the `cached` keyword. Its purpose is to get accurate performance measurements when tuning the final stage of a query, like a data-flow configuration. This is equivalent to the `codeql database cleanup --mode=normal` CLI command. In contrast, the existing "CodeQL: Clear Cache" command clears the entire cache. CodeQL CLI v2.15.1 or later is required. [#2928](https://github.com/github/vscode-codeql/pull/2928)
- Fix syntax highlighting directly after import statements with instantiation arguments. [#2792](https://github.com/github/vscode-codeql/pull/2792)
- The `debug.saveBeforeStart` setting is now respected when running variant analyses. [#2950](https://github.com/github/vscode-codeql/pull/2950)
- The 'open database' button of the model editor was renamed to 'open source'. Also, it's now only available if the source archive is available as a workspace folder. [#2945](https://github.com/github/vscode-codeql/pull/2945)
## 1.9.1 - 29 September 2023
- Add warning when using a VS Code version older than 1.82.0. [#2854](https://github.com/github/vscode-codeql/pull/2854)
- Fix a bug when parsing large evaluation log summaries. [#2858](https://github.com/github/vscode-codeql/pull/2858)
- Right-align and format numbers in raw result tables. [#2864](https://github.com/github/vscode-codeql/pull/2864)
- Remove rate limit warning notifications when using Code Search to add repositories to a variant analysis list. [#2812](https://github.com/github/vscode-codeql/pull/2812)
## 1.9.0 - 19 September 2023
- Release the [CodeQL model editor](https://codeql.github.com/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor) to create CodeQL model packs for Java frameworks. Open the editor using the "CodeQL: Open CodeQL Model Editor (Beta)" command. [#2823](https://github.com/github/vscode-codeql/pull/2823)
## 1.8.12 - 11 September 2023
- Fix a bug where variant analysis queries would fail for queries in the `codeql/java-queries` query pack. [#2786](https://github.com/github/vscode-codeql/pull/2786)
## 1.8.11 - 7 September 2023
- Update how variant analysis results are displayed. For queries with ["path-problem" or "problem" `@kind`](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/#metadata-properties), you can choose to display the results as rendered alerts or as a table of raw results. For queries with any other `@kind`, the results are displayed as a table. [#2745](https://github.com/github/vscode-codeql/pull/2745) & [#2749](https://github.com/github/vscode-codeql/pull/2749)
- When running variant analyses, don't download artifacts for repositories with no results. [#2736](https://github.com/github/vscode-codeql/pull/2736)
- Group the extension settings, so that they're easier to find in the Settings UI. [#2706](https://github.com/github/vscode-codeql/pull/2706)
## 1.8.10 - 15 August 2023
- Add a code lens to make the `CodeQL: Open Referenced File` command more discoverable. Click the "Open referenced file" prompt in a `.qlref` file to jump to the referenced `.ql` file. [#2704](https://github.com/github/vscode-codeql/pull/2704)
## 1.8.9 - 3 August 2023
- Remove "last updated" information and sorting from variant analysis results view. [#2637](https://github.com/github/vscode-codeql/pull/2637)
- Links to code on GitHub now include column numbers as well as line numbers. [#2406](https://github.com/github/vscode-codeql/pull/2406)
- No longer highlight trailing commas for jump to definition. [#2615](https://github.com/github/vscode-codeql/pull/2615)
- Fix a bug where the QHelp preview page was not being refreshed after changes to the underlying `.qhelp` file. [#2660](https://github.com/github/vscode-codeql/pull/2660)
"description":"Names of extension packs to include in the evaluation. These are resolved from the locations specified in `additionalPacks`."
},
"additionalRunQueryArgs":{
"type":"object",
"description":"**Internal use only**. Additional arguments to pass to the `runQuery` command of the query server, without validation."
}
}
}
@@ -182,215 +166,288 @@
"path":"./snippets.json"
}
],
"configuration":{
"type":"object",
"title":"CodeQL",
"properties":{
"codeQL.cli.executablePath":{
"scope":"machine-overridable",
"type":"string",
"default":"",
"markdownDescription":"Path to the CodeQL executable that should be used by the CodeQL extension. The executable is named `codeql` on Linux/Mac and `codeql.exe` on Windows. If empty, the extension will look for a CodeQL executable on your shell PATH, or if CodeQL is not on your PATH, download and manage its own CodeQL executable (note: if you later introduce CodeQL on your PATH, the extension will prefer a CodeQL executable it has downloaded itself)."
},
"codeQL.runningQueries.numberOfThreads":{
"type":"integer",
"default":1,
"minimum":0,
"maximum":1024,
"description":"Number of threads for running queries."
},
"codeQL.runningQueries.saveCache":{
"type":"boolean",
"default":false,
"scope":"window",
"description":"Aggressively save intermediate results to the disk cache. This may speed up subsequent queries if they are similar. Be aware that using this option will greatly increase disk usage and initial evaluation time."
},
"codeQL.runningQueries.cacheSize":{
"type":[
"integer",
"null"
],
"default":null,
"minimum":1024,
"description":"Maximum size of the disk cache (in MB). Leave blank to allow the evaluator to automatically adjust the size of the disk cache based on the size of the codebase and the complexity of the queries being executed."
},
"codeQL.runningQueries.timeout":{
"type":[
"integer",
"null"
],
"default":null,
"minimum":0,
"maximum":2147483647,
"description":"Timeout (in seconds) for running queries. Leave blank or set to zero for no timeout."
},
"codeQL.runningQueries.memory":{
"type":[
"integer",
"null"
],
"default":null,
"minimum":1024,
"description":"Memory (in MB) to use for running queries. Leave blank for CodeQL to choose a suitable value based on your system's available memory."
},
"codeQL.runningQueries.debug":{
"type":"boolean",
"default":false,
"description":"Enable debug logging and tuple counting when running CodeQL queries. This information is useful for debugging query performance."
},
"codeQL.runningQueries.maxPaths":{
"type":"integer",
"default":4,
"minimum":1,
"maximum":256,
"markdownDescription":"Max number of paths to display for each alert found by a path query (`@kind path-problem`)."
},
"codeQL.runningQueries.autoSave":{
"type":"boolean",
"description":"Enable automatically saving a modified query file when running a query.",
"markdownDeprecationMessage":"This property is deprecated and no longer has any effect. To control automatic saving of documents before running queries, use the `debug.saveBeforeStart` setting."
},
"codeQL.runningQueries.maxQueries":{
"type":"integer",
"default":20,
"description":"Max number of simultaneous queries to run using the 'CodeQL: Run Queries' command."
},
"codeQL.runningQueries.customLogDirectory":{
"type":[
"string",
null
],
"default":null,
"description":"Path to a directory where the CodeQL extension should store query server logs. If empty, the extension stores logs in a temporary workspace folder and deletes the contents after each run.",
"markdownDeprecationMessage":"This property is deprecated and no longer has any effect. All query logs are stored in the query history folder next to the query results."
},
"codeQL.runningQueries.quickEvalCodelens":{
"type":"boolean",
"default":true,
"description":"Enable the 'Quick Evaluation' CodeLens."
},
"codeQL.runningQueries.useExtensionPacks":{
"type":"string",
"default":"none",
"enum":[
"none",
"all"
],
"enumDescriptions":[
"Do not use extension packs.",
"Use all extension packs found in the workspace."
],
"description":"Choose whether or not to run queries using extension packs. Requires CodeQL CLI v2.12.3 or later."
},
"codeQL.resultsDisplay.pageSize":{
"type":"integer",
"default":200,
"description":"Max number of query results to display per page in the results view."
},
"codeQL.queryHistory.format":{
"type":"string",
"default":"%q on %d - %s %r [%t]",
"markdownDescription":"Default string for how to label query history items.\n* %t is the time of the query\n* %q is the human-readable query name\n* %f is the query file name\n* %d is the database name\n* %r is the number of results\n* %s is a status string"
},
"codeQL.queryHistory.ttl":{
"type":"number",
"default":30,
"description":"Number of days to retain queries in the query history before being automatically deleted.",
"scope":"machine"
},
"codeQL.runningTests.additionalTestArguments":{
"scope":"window",
"type":"array",
"default":[],
"markdownDescription":"Additional command line arguments to pass to the CLI when [running tests](https://codeql.github.com/docs/codeql-cli/manual/test-run/). This setting should be an array of strings, each containing an argument to be passed."
},
"codeQL.runningTests.numberOfThreads":{
"scope":"window",
"type":"integer",
"default":1,
"minimum":0,
"maximum":1024,
"description":"Number of threads for running CodeQL tests."
},
"codeQL.telemetry.enableTelemetry":{
"type":"boolean",
"default":false,
"scope":"application",
"markdownDescription":"Specifies whether to send CodeQL usage telemetry. This setting AND the global `#telemetry.enableTelemetry#` setting must be checked for telemetry to be sent to GitHub. For more information, see the [telemetry documentation](https://codeql.github.com/docs/codeql-for-visual-studio-code/about-telemetry-in-codeql-for-visual-studio-code)"
},
"codeQL.telemetry.logTelemetry":{
"type":"boolean",
"default":false,
"scope":"application",
"description":"Specifies whether or not to write telemetry events to the extension log."
"patternErrorMessage":"Please enter a valid GitHub repository",
"markdownDescription":"[For internal use only] The name of the GitHub repository in which the GitHub Actions workflow is run when using the \"Run Variant Analysis\" command. The repository should be of the form `<owner>/<repo>`)."
},
"codeQL.variantAnalysis.defaultResultsFilter":{
"type":"string",
"default":"all",
"enum":[
"all",
"withResults"
],
"enumDescriptions":[
"Show all repositories in the results view.",
"Show only repositories withresults in the results view."
],
"description":"The default filter to apply to the variant analysis results view."
},
"codeQL.variantAnalysis.defaultResultsSort":{
"type":"string",
"default":"numberOfResults",
"enum":[
"alphabetically",
"popularity",
"numberOfResults"
],
"enumDescriptions":[
"Sort repositories alphabetically in the results view.",
"Sort repositories by popularity in the results view.",
"Sort repositories by number of results in the results view."
],
"description":"The default sorting order for repositories in the variant analysis results view."
},
"codeQL.logInsights.joinOrderWarningThreshold":{
"type":"number",
"default":50,
"scope":"window",
"minimum":0,
"description":"Report a warning for any join order whose metric exceeds this value."
},
"codeQL.databaseDownload.allowHttp":{
"type":"boolean",
"default":false,
"description":"Allow database to be downloaded via HTTP. Warning: enabling this option will allow downloading from insecure servers."
},
"codeQL.createQuery.qlPackLocation":{
"type":"string",
"patternErrorMessage":"Please enter a valid folder",
"markdownDescription":"The name of the folder where we want to create queries and QL packs via the \"CodeQL: Create Query\" command. The folder should exist."
},
"codeQL.createQuery.autogenerateQlPacks":{
"type":"string",
"default":"ask",
"enum":[
"ask",
"never"
],
"enumDescriptions":[
"Ask to create a QL pack when a new CodeQL database is added.",
"Never create a QL pack when a new CodeQL database is added."
],
"description":"Ask the user to generate a QL pack when a new CodeQL database is downloaded."
"configuration":[
{
"type":"object",
"title":"CLI",
"order":0,
"properties":{
"codeQL.cli.executablePath":{
"scope":"machine-overridable",
"type":"string",
"default":"",
"markdownDescription":"Path to the CodeQL executable that should be used by the CodeQL extension. The executable is named `codeql` on Linux/Mac and `codeql.exe` on Windows. If empty, the extension will look for a CodeQL executable on your shell PATH, or if CodeQL is not on your PATH, download and manage its own CodeQL executable (note: if you later introduce CodeQL on your PATH, the extension will prefer a CodeQL executable it has downloaded itself)."
}
}
},
{
"type":"object",
"title":"Running queries",
"order":1,
"properties":{
"codeQL.runningQueries.numberOfThreads":{
"type":"integer",
"default":1,
"minimum":0,
"maximum":1024,
"description":"Number of threads for running queries."
},
"codeQL.runningQueries.saveCache":{
"type":"boolean",
"default":false,
"scope":"window",
"description":"Aggressively save intermediate results to the disk cache. This may speed up subsequent queries if they are similar. Be aware that using this option will greatly increase disk usage and initial evaluation time."
},
"codeQL.runningQueries.cacheSize":{
"type":[
"integer",
"null"
],
"default":null,
"minimum":1024,
"description":"Maximum size of the disk cache (in MB). Leave blank to allow the evaluator to automatically adjust the size of the disk cache based on the size of the codebase and the complexity of the queries being executed."
},
"codeQL.runningQueries.timeout":{
"type":[
"integer",
"null"
],
"default":null,
"minimum":0,
"maximum":2147483647,
"description":"Timeout (in seconds) for running queries. Leave blank or set to zero for no timeout."
},
"codeQL.runningQueries.memory":{
"type":[
"integer",
"null"
],
"default":null,
"minimum":1024,
"description":"Memory (in MB) to use for running queries. Leave blank for CodeQL to choose a suitable value based on your system's available memory."
},
"codeQL.runningQueries.debug":{
"type":"boolean",
"default":false,
"description":"Enable debug logging and tuple counting when running CodeQL queries. This information is useful for debugging query performance."
},
"codeQL.runningQueries.maxPaths":{
"type":"integer",
"default":4,
"minimum":1,
"maximum":256,
"markdownDescription":"Max number of paths to display for each alert found by a path query (`@kind path-problem`)."
},
"codeQL.runningQueries.autoSave":{
"type":"boolean",
"description":"Enable automatically saving a modified query file when running a query.",
"markdownDeprecationMessage":"This property is deprecated and no longer has any effect. To control automatic saving of documents before running queries, use the `debug.saveBeforeStart` setting."
},
"codeQL.runningQueries.maxQueries":{
"type":"integer",
"default":20,
"description":"Max number of simultaneous queries to run using the 'CodeQL: Run Queries' command."
},
"codeQL.runningQueries.customLogDirectory":{
"type":[
"string",
null
],
"default":null,
"description":"Path to a directory where the CodeQL extension should store query server logs. If empty, the extension stores logs in a temporary workspace folder and deletes the contents after each run.",
"markdownDeprecationMessage":"This property is deprecated and no longer has any effect. All query logs are stored in the query history folder next to the query results."
},
"codeQL.runningQueries.quickEvalCodelens":{
"type":"boolean",
"default":true,
"description":"Enable the 'Quick Evaluation' CodeLens."
},
"codeQL.runningQueries.useExtensionPacks":{
"type":"string",
"default":"none",
"enum":[
"none",
"all"
],
"enumDescriptions":[
"Do not use extension packs.",
"Use all extension packs found in the workspace."
],
"description":"Choose whether or not to run queries using extension packs. Requires CodeQL CLI v2.12.3 or later."
}
}
},
{
"type":"object",
"title":"Results",
"order":2,
"properties":{
"codeQL.resultsDisplay.pageSize":{
"type":"integer",
"default":200,
"description":"Max number of query results to display per page in the results view."
}
}
},
{
"type":"object",
"title":"Query history",
"order":3,
"properties":{
"codeQL.queryHistory.format":{
"type":"string",
"default":"%q on %d - %s %r [%t]",
"markdownDescription":"Default string for how to label query history items.\n* %t is the time of the query\n* %q is the human-readable query name\n* %f is the query file name\n* %d is the database name\n* %r is the number of results\n* %s is a status string"
},
"codeQL.queryHistory.ttl":{
"type":"number",
"default":30,
"description":"Number of days to retain queries in the query history before being automatically deleted.",
"scope":"machine"
}
}
},
{
"type":"object",
"title":"Running tests",
"order":4,
"properties":{
"codeQL.runningTests.additionalTestArguments":{
"scope":"window",
"type":"array",
"default":[],
"markdownDescription":"Additional command line arguments to pass to the CLI when [running tests](https://codeql.github.com/docs/codeql-cli/manual/test-run/). This setting should be an array of strings, each containing an argument to be passed."
},
"codeQL.runningTests.numberOfThreads":{
"scope":"window",
"type":"integer",
"default":1,
"minimum":0,
"maximum":1024,
"description":"Number of threads for running CodeQL tests."
"patternErrorMessage":"Please enter a valid GitHub repository",
"markdownDescription":"[For internal use only] The name of the GitHub repository in which the GitHub Actions workflow is run when using the \"Run Variant Analysis\" command. The repository should be of the form `<owner>/<repo>`)."
},
"codeQL.variantAnalysis.defaultResultsFilter":{
"type":"string",
"default":"all",
"enum":[
"all",
"withResults"
],
"enumDescriptions":[
"Show all repositories in the results view.",
"Show only repositories with results in the results view."
],
"description":"The default filter to apply to the variant analysis results view."
},
"codeQL.variantAnalysis.defaultResultsSort":{
"type":"string",
"default":"numberOfResults",
"enum":[
"alphabetically",
"popularity",
"numberOfResults"
],
"enumDescriptions":[
"Sort repositories alphabetically in the results view.",
"Sort repositories by popularity in the results view.",
"Sort repositories by number of results in the results view."
],
"description":"The default sorting order for repositories in the variant analysis results view."
}
}
},
{
"type":"object",
"title":"Downloading databases",
"order":6,
"properties":{
"codeQL.databaseDownload.allowHttp":{
"type":"boolean",
"default":false,
"description":"Allow database to be downloaded via HTTP. Warning: enabling this option will allow downloading from insecure servers."
}
}
},
{
"type":"object",
"title":"Creating queries",
"order":7,
"properties":{
"codeQL.createQuery.qlPackLocation":{
"type":"string",
"patternErrorMessage":"Please enter a valid folder",
"markdownDescription":"The name of the folder where we want to create queries and QL packs via the \"CodeQL: Create Query\" command. The folder should exist."
},
"codeQL.createQuery.autogenerateQlPacks":{
"type":"string",
"default":"ask",
"enum":[
"ask",
"never"
],
"enumDescriptions":[
"Ask to create a QL pack when a new CodeQL database is added.",
"Never create a QL pack when a new CodeQL database is added."
],
"description":"Ask the user to generate a QL pack when a new CodeQL database is downloaded."
}
}
},
{
"type":"object",
"title":"Log insights",
"order":8,
"properties":{
"codeQL.logInsights.joinOrderWarningThreshold":{
"type":"number",
"default":50,
"scope":"window",
"minimum":0,
"description":"Report a warning for any join order whose metric exceeds this value."
}
}
},
{
"type":"object",
"title":"Telemetry",
"order":9,
"properties":{
"codeQL.telemetry.enableTelemetry":{
"type":"boolean",
"default":false,
"scope":"application",
"markdownDescription":"Specifies whether to send CodeQL usage telemetry. This setting AND the one of the global telemetry settings (`#telemetry.enableTelemetry#` or `#telemetry.telemetryLevel#`) must be enabled for telemetry to be sent to GitHub. For more information, see the [telemetry documentation](https://codeql.github.com/docs/codeql-for-visual-studio-code/about-telemetry-in-codeql-for-visual-studio-code)",
"tags":[
"telemetry",
"usesOnlineServices"
]
},
"codeQL.telemetry.logTelemetry":{
"type":"boolean",
"default":false,
"scope":"application",
"description":"Specifies whether or not to write telemetry events to the extension log.",
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.