Compare commits
208 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df5a7bce19 | ||
|
|
1b3dc7d132 | ||
|
|
247ba4e8ea | ||
|
|
a3ce9f516a | ||
|
|
f6b3f28039 | ||
|
|
ba423376cd | ||
|
|
e9b459adaf | ||
|
|
074f3fb402 | ||
|
|
c316d52514 | ||
|
|
9af0239041 | ||
|
|
5cf6786e9c | ||
|
|
09077a0e24 | ||
|
|
47c897e9bd | ||
|
|
096e6e8ffd | ||
|
|
2d033bff57 | ||
|
|
1861692055 | ||
|
|
ac7a37c02e | ||
|
|
b5d6c4d84c | ||
|
|
cdd6553735 | ||
|
|
6bb0854ff2 | ||
|
|
c51aaf7790 | ||
|
|
a6745379c4 | ||
|
|
1178e4c3ae | ||
|
|
59c567a8fa | ||
|
|
4f2b46aa85 | ||
|
|
66f12bfbef | ||
|
|
2b5d233847 | ||
|
|
11ca60f213 | ||
|
|
dea6bc257a | ||
|
|
26b602399a | ||
|
|
0836307f29 | ||
|
|
e61f619f8f | ||
|
|
fad674b1c5 | ||
|
|
4d2856699b | ||
|
|
b51d027b0c | ||
|
|
595249a9d6 | ||
|
|
00b3ea473c | ||
|
|
46f80efa4c | ||
|
|
05a7d933d1 | ||
|
|
6da39ee79f | ||
|
|
bb4d97999e | ||
|
|
af3434b87c | ||
|
|
083b232bb3 | ||
|
|
a65c91c84e | ||
|
|
23f8c48b06 | ||
|
|
7fbb1286b9 | ||
|
|
571e6f285f | ||
|
|
e64cf4073c | ||
|
|
e3a2a11b3d | ||
|
|
9b121d56c2 | ||
|
|
b548bbd43b | ||
|
|
ccdb46a1bb | ||
|
|
d1a342beaf | ||
|
|
eeac123ee5 | ||
|
|
73c596c87a | ||
|
|
c6f40b3152 | ||
|
|
3a0843219e | ||
|
|
b00a2cc803 | ||
|
|
14b9f932ab | ||
|
|
f3e32baec4 | ||
|
|
20e5429af8 | ||
|
|
d23178be85 | ||
|
|
b09e9942b2 | ||
|
|
fc5cfd0aec | ||
|
|
259159df45 | ||
|
|
bc7c97e216 | ||
|
|
af22a1573b | ||
|
|
d2eb366e74 | ||
|
|
6a6028bf63 | ||
|
|
3c7e1fc192 | ||
|
|
0433f899fd | ||
|
|
c82f00eb45 | ||
|
|
94edb9bf16 | ||
|
|
4a87a6fddf | ||
|
|
9543ab339f | ||
|
|
398f16c4cb | ||
|
|
ea14767f2a | ||
|
|
b6deb8e0ea | ||
|
|
7b78fc1dd9 | ||
|
|
0ccd39a368 | ||
|
|
24b93e247c | ||
|
|
6e3b0b245c | ||
|
|
6939caa6a5 | ||
|
|
2e8e7cae47 | ||
|
|
f8d542d141 | ||
|
|
6715669036 | ||
|
|
c38a01e937 | ||
|
|
74a12b9fed | ||
|
|
906af36337 | ||
|
|
359e23fc59 | ||
|
|
b13dd7545c | ||
|
|
ac0dfa5e83 | ||
|
|
2ffb7894d4 | ||
|
|
422f6de05e | ||
|
|
ee88ea1658 | ||
|
|
0daa06bc0d | ||
|
|
c584d02805 | ||
|
|
c56936e2f6 | ||
|
|
1fc735639b | ||
|
|
0352629eb4 | ||
|
|
877fc51494 | ||
|
|
886f211441 | ||
|
|
75d275c93f | ||
|
|
5d1fa1d6b5 | ||
|
|
4fce448717 | ||
|
|
610c936690 | ||
|
|
d777427c0a | ||
|
|
81924af1e4 | ||
|
|
45f7d22d2a | ||
|
|
dcef43c6d5 | ||
|
|
160642ec73 | ||
|
|
240dd51dc0 | ||
|
|
ad42b060b7 | ||
|
|
23b2327bd0 | ||
|
|
450d294bab | ||
|
|
4e376063ee | ||
|
|
39cb219e56 | ||
|
|
e01fb9172f | ||
|
|
1764151bf7 | ||
|
|
82c40c69e6 | ||
|
|
1a34d782e8 | ||
|
|
08c1b57661 | ||
|
|
5fc34248b3 | ||
|
|
bee7d81fb4 | ||
|
|
3094405f68 | ||
|
|
392e76d8f2 | ||
|
|
6e4e89a006 | ||
|
|
cb2802e2e7 | ||
|
|
af1af074dc | ||
|
|
d65ce3e24a | ||
|
|
13ce5f7e3c | ||
|
|
eebe11e5dd | ||
|
|
bd5d361de1 | ||
|
|
e3596db8e7 | ||
|
|
21b1c997c6 | ||
|
|
9ecf97152a | ||
|
|
3983087bc8 | ||
|
|
636d0bf025 | ||
|
|
fe4d87dae5 | ||
|
|
1794c6b7f7 | ||
|
|
23d815ff05 | ||
|
|
8945abcb57 | ||
|
|
a576dace04 | ||
|
|
3e7577c984 | ||
|
|
acb76a64ef | ||
|
|
ba0cf9a22d | ||
|
|
443c9ac56c | ||
|
|
91e69c93be | ||
|
|
7e31b6e42a | ||
|
|
cff7170fdc | ||
|
|
ca40963238 | ||
|
|
b1ff75b646 | ||
|
|
e5ab1118ee | ||
|
|
d90fb69e39 | ||
|
|
2f4eed4a4d | ||
|
|
2cb520d603 | ||
|
|
4a752d27c4 | ||
|
|
6cfd20eca4 | ||
|
|
36259b21db | ||
|
|
cd14a37f79 | ||
|
|
d6e0c6a4a7 | ||
|
|
9f589880df | ||
|
|
b7a4419420 | ||
|
|
1d2ef805fb | ||
|
|
2888fddf61 | ||
|
|
a5c675b8c7 | ||
|
|
d05dba4bba | ||
|
|
2db0ca8ecc | ||
|
|
497dc31819 | ||
|
|
cd309aece6 | ||
|
|
aaaf799557 | ||
|
|
ece54b8f7d | ||
|
|
0824892507 | ||
|
|
082268e201 | ||
|
|
27bce4a1e9 | ||
|
|
56ecd1a84c | ||
|
|
84ab602277 | ||
|
|
a86a373e19 | ||
|
|
90a39ec293 | ||
|
|
3dd8583116 | ||
|
|
b0663669b0 | ||
|
|
493c9cb5fe | ||
|
|
99dd9166b3 | ||
|
|
10604808e0 | ||
|
|
3164c3f11f | ||
|
|
ed36fb725b | ||
|
|
67b138f0c2 | ||
|
|
fed9870a0c | ||
|
|
51844bb541 | ||
|
|
0acd06f773 | ||
|
|
acb9669e9f | ||
|
|
2a71183695 | ||
|
|
1c3d3428e4 | ||
|
|
c77bb2b9c2 | ||
|
|
d3d96a1dbe | ||
|
|
7c62176f59 | ||
|
|
87754a9ec9 | ||
|
|
ee78df683a | ||
|
|
3764a7e567 | ||
|
|
552baa5570 | ||
|
|
57262446fb | ||
|
|
5b128711e5 | ||
|
|
6787deed04 | ||
|
|
381e8c0849 | ||
|
|
74c6f3ce54 | ||
|
|
4e70c8999f | ||
|
|
6005e3ab70 | ||
|
|
7c93c7046e |
111
.github/workflows/cli-test.yml
vendored
Normal file
111
.github/workflows/cli-test.yml
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
name: Run CLI tests
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
paths:
|
||||
- .github/workflows/cli-test.yml
|
||||
- extensions/ql-vscode/src/codeql-cli/**
|
||||
- extensions/ql-vscode/src/language-support/**
|
||||
- extensions/ql-vscode/src/query-server/**
|
||||
- extensions/ql-vscode/supported_cli_versions.json
|
||||
|
||||
jobs:
|
||||
find-nightly:
|
||||
name: Find Nightly Release
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
url: ${{ steps.get-url.outputs.nightly-url }}
|
||||
steps:
|
||||
- name: Get Nightly Release URL
|
||||
id: get-url
|
||||
env:
|
||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
shell: bash
|
||||
# This workflow step gets an unstable testing version of the CodeQL CLI. It should not be used outside of these tests.
|
||||
run: |
|
||||
LATEST=`gh api repos/dsp-testing/codeql-cli-nightlies/releases --jq '.[].tag_name' --method GET --raw-field 'per_page=1'`
|
||||
echo "nightly-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$LATEST" >> "$GITHUB_OUTPUT"
|
||||
|
||||
set-matrix:
|
||||
name: Set Matrix for cli-test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set the variables
|
||||
id: set-variables
|
||||
run: echo "cli-versions=$(cat ./extensions/ql-vscode/supported_cli_versions.json | jq -rc)" >> $GITHUB_OUTPUT
|
||||
outputs:
|
||||
cli-versions: ${{ steps.set-variables.outputs.cli-versions }}
|
||||
|
||||
cli-test:
|
||||
name: CLI Test
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: [find-nightly, set-matrix]
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
version: ${{ fromJson(needs.set-matrix.outputs.cli-versions) }}
|
||||
fail-fast: false
|
||||
env:
|
||||
CLI_VERSION: ${{ matrix.version }}
|
||||
NIGHTLY_URL: ${{ needs.find-nightly.outputs.url }}
|
||||
TEST_CODEQL_PATH: '${{ github.workspace }}/codeql'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.17.1'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: extensions/ql-vscode/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: extensions/ql-vscode
|
||||
run: |
|
||||
npm ci
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
working-directory: extensions/ql-vscode
|
||||
run: |
|
||||
npm run build
|
||||
shell: bash
|
||||
|
||||
- name: Decide on ref of CodeQL repo
|
||||
id: choose-ref
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ matrix.version }}" == "nightly" ]]
|
||||
then
|
||||
REF="codeql-cli/latest"
|
||||
else
|
||||
REF="codeql-cli/${{ matrix.version }}"
|
||||
fi
|
||||
echo "ref=$REF" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Checkout QL
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: github/codeql
|
||||
ref: ${{ steps.choose-ref.outputs.ref }}
|
||||
path: codeql
|
||||
|
||||
- name: Run CLI tests (Linux)
|
||||
working-directory: extensions/ql-vscode
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
unset DBUS_SESSION_BUS_ADDRESS
|
||||
/usr/bin/xvfb-run npm run test:cli-integration
|
||||
|
||||
- name: Run CLI tests (Windows)
|
||||
working-directory: extensions/ql-vscode
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
npm run test:cli-integration
|
||||
50
.github/workflows/main.yml
vendored
50
.github/workflows/main.yml
vendored
@@ -53,22 +53,6 @@ jobs:
|
||||
name: vscode-codeql-extension
|
||||
path: artifacts
|
||||
|
||||
find-nightly:
|
||||
name: Find Nightly Release
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
url: ${{ steps.get-url.outputs.nightly-url }}
|
||||
steps:
|
||||
- name: Get Nightly Release URL
|
||||
id: get-url
|
||||
env:
|
||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
shell: bash
|
||||
# This workflow step gets an unstable testing version of the CodeQL CLI. It should not be used outside of these tests.
|
||||
run: |
|
||||
LATEST=`gh api repos/dsp-testing/codeql-cli-nightlies/releases --jq '.[].tag_name' --method GET --raw-field 'per_page=1'`
|
||||
echo "nightly-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$LATEST" >> "$GITHUB_OUTPUT"
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
@@ -198,31 +182,31 @@ jobs:
|
||||
run: |
|
||||
npm run test:vscode-integration
|
||||
|
||||
set-matrix:
|
||||
name: Set Matrix for cli-test
|
||||
get-latest-cli-version:
|
||||
name: Get latest CLI version
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set the variables
|
||||
id: set-variables
|
||||
run: echo "cli-versions=$(cat ./extensions/ql-vscode/supported_cli_versions.json | jq -rc)" >> $GITHUB_OUTPUT
|
||||
- name: Set the variable
|
||||
id: set-variable
|
||||
run: |
|
||||
echo "cli-version=$(cat ./extensions/ql-vscode/supported_cli_versions.json | jq -rc '.[0]')" >> $GITHUB_OUTPUT
|
||||
echo "$cli-version"
|
||||
outputs:
|
||||
cli-versions: ${{ steps.set-variables.outputs.cli-versions }}
|
||||
cli-version: ${{ steps.set-variable.outputs.cli-version }}
|
||||
|
||||
cli-test:
|
||||
name: CLI Test
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: [find-nightly, set-matrix]
|
||||
needs: [get-latest-cli-version]
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
version: ${{ fromJson(needs.set-matrix.outputs.cli-versions) }}
|
||||
fail-fast: false
|
||||
env:
|
||||
CLI_VERSION: ${{ matrix.version }}
|
||||
NIGHTLY_URL: ${{ needs.find-nightly.outputs.url }}
|
||||
CLI_VERSION: ${{ needs.get-latest-cli-version.outputs.cli-version }}
|
||||
TEST_CODEQL_PATH: '${{ github.workspace }}/codeql'
|
||||
|
||||
steps:
|
||||
@@ -247,23 +231,11 @@ jobs:
|
||||
npm run build
|
||||
shell: bash
|
||||
|
||||
- name: Decide on ref of CodeQL repo
|
||||
id: choose-ref
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ matrix.version }}" == "nightly" ]]
|
||||
then
|
||||
REF="codeql-cli/latest"
|
||||
else
|
||||
REF="codeql-cli/${{ matrix.version }}"
|
||||
fi
|
||||
echo "ref=$REF" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Checkout QL
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: github/codeql
|
||||
ref: ${{ steps.choose-ref.outputs.ref }}
|
||||
ref: 'codeql-cli/${{ needs.get-latest-cli-version.outputs.cli-version }}'
|
||||
path: codeql
|
||||
|
||||
- name: Run CLI tests (Linux)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
**/* @github/codeql-vscode-reviewers
|
||||
**/variant-analysis/ @github/code-scanning-secexp-reviewers
|
||||
**/databases/ @github/code-scanning-secexp-reviewers
|
||||
**/data-extensions-editor/ @github/code-scanning-secexp-reviewers
|
||||
**/model-editor/ @github/code-scanning-secexp-reviewers
|
||||
**/queries-panel/ @github/code-scanning-secexp-reviewers
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Releasing (write access required)
|
||||
|
||||
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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# CodeQL for Visual Studio Code: Changelog
|
||||
|
||||
## 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)
|
||||
|
||||
15755
extensions/ql-vscode/package-lock.json
generated
15755
extensions/ql-vscode/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
"description": "CodeQL for Visual Studio Code",
|
||||
"author": "GitHub",
|
||||
"private": true,
|
||||
"version": "1.8.10",
|
||||
"version": "1.8.11",
|
||||
"publisher": "GitHub",
|
||||
"license": "MIT",
|
||||
"icon": "media/VS-marketplace-CodeQL-icon.png",
|
||||
@@ -182,215 +182,281 @@
|
||||
"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."
|
||||
},
|
||||
"codeQL.variantAnalysis.controllerRepo": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"pattern": "^$|^(?:[a-zA-Z0-9]+-)*[a-zA-Z0-9]+/[a-zA-Z0-9-_]+$",
|
||||
"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."
|
||||
},
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"title": "Variant analysis",
|
||||
"order": 5,
|
||||
"properties": {
|
||||
"codeQL.variantAnalysis.controllerRepo": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"pattern": "^$|^(?:[a-zA-Z0-9]+-)*[a-zA-Z0-9]+/[a-zA-Z0-9-_]+$",
|
||||
"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 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."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
],
|
||||
"commands": [
|
||||
{
|
||||
"command": "codeQL.authenticateToGitHub",
|
||||
@@ -531,6 +597,11 @@
|
||||
"command": "codeQLQueries.runVariantAnalysisContextMenu",
|
||||
"title": "Run against variant analysis repositories"
|
||||
},
|
||||
{
|
||||
"command": "codeQLQueries.createQuery",
|
||||
"title": "Create query",
|
||||
"icon": "$(new-file)"
|
||||
},
|
||||
{
|
||||
"command": "codeQLVariantAnalysisRepositories.openConfigFile",
|
||||
"title": "Open database configuration file",
|
||||
@@ -877,8 +948,8 @@
|
||||
"enablement": "codeql.hasQLSource"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.openDataExtensionsEditor",
|
||||
"title": "CodeQL: Open Data Extensions Editor"
|
||||
"command": "codeQL.openModelEditor",
|
||||
"title": "CodeQL: Open CodeQL Model Editor (Beta)"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.mockGitHubApiServer.startRecording",
|
||||
@@ -940,6 +1011,11 @@
|
||||
"when": "view == codeQLDatabases",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "codeQLQueries.createQuery",
|
||||
"when": "view == codeQLQueries",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "codeQLQueryHistory.sortByName",
|
||||
"when": "view == codeQLQueryHistory",
|
||||
@@ -1224,6 +1300,10 @@
|
||||
"command": "codeQLQueries.runLocalQueriesFromPanel",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "codeQLQueries.createQuery",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.runLocalQueryFromFileTab",
|
||||
"when": "false"
|
||||
@@ -1349,8 +1429,8 @@
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.openDataExtensionsEditor",
|
||||
"when": "config.codeQL.canary && config.codeQL.dataExtensions.editor"
|
||||
"command": "codeQL.openModelEditor",
|
||||
"when": "config.codeQL.canary && config.codeQL.model.editor"
|
||||
},
|
||||
{
|
||||
"command": "codeQLQueries.runLocalQueryContextMenu",
|
||||
@@ -1586,7 +1666,7 @@
|
||||
},
|
||||
{
|
||||
"command": "codeQL.createQuery",
|
||||
"when": "config.codeQL.codespacesTemplate"
|
||||
"when": "config.codeQL.codespacesTemplate || config.codeQL.canary && config.codeQL.queriesPanel"
|
||||
},
|
||||
{
|
||||
"command": "codeQLTests.acceptOutputContextTestItem",
|
||||
@@ -1658,8 +1738,8 @@
|
||||
],
|
||||
"panel": [
|
||||
{
|
||||
"id": "codeql-model-details",
|
||||
"title": "CodeQL Model Details",
|
||||
"id": "codeql-methods-usage",
|
||||
"title": "CodeQL Methods Usage",
|
||||
"icon": "media/logo.svg"
|
||||
}
|
||||
]
|
||||
@@ -1693,17 +1773,25 @@
|
||||
"when": "config.codeQL.canary"
|
||||
}
|
||||
],
|
||||
"codeql-model-details": [
|
||||
"codeql-methods-usage": [
|
||||
{
|
||||
"id": "codeQLModelDetails",
|
||||
"name": "CodeQL Model Details",
|
||||
"when": "config.codeQL.canary && config.codeQL.dataExtensions.modelDetailsView"
|
||||
"id": "codeQLMethodsUsage",
|
||||
"name": "CodeQL Methods Usage",
|
||||
"when": "config.codeQL.canary && codeql.modelEditorOpen"
|
||||
}
|
||||
],
|
||||
"explorer": [
|
||||
{
|
||||
"type": "webview",
|
||||
"id": "codeQLMethodModeling",
|
||||
"name": "CodeQL Method Modeling",
|
||||
"when": "config.codeQL.canary && config.codeQL.model.methodModelingView && codeql.modelEditorOpen"
|
||||
}
|
||||
]
|
||||
},
|
||||
"viewsWelcome": [
|
||||
{
|
||||
"view": "codeQLModelDetails",
|
||||
"view": "codeQLMethodsUsage",
|
||||
"contents": "Loading..."
|
||||
},
|
||||
{
|
||||
@@ -1716,7 +1804,8 @@
|
||||
},
|
||||
{
|
||||
"view": "codeQLQueries",
|
||||
"contents": "Looking for queries..."
|
||||
"contents": "We didn't find any CodeQL queries in this workspace. [Create one to get started](command:codeQLQueries.createQuery).",
|
||||
"when": "codeQL.noQueries"
|
||||
},
|
||||
{
|
||||
"view": "codeQLDatabases",
|
||||
@@ -1816,7 +1905,7 @@
|
||||
"@storybook/react-webpack5": "^7.1.0",
|
||||
"@storybook/theming": "^7.1.0",
|
||||
"@testing-library/dom": "^9.3.0",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/child-process-promise": "^2.2.1",
|
||||
@@ -1876,7 +1965,7 @@
|
||||
"jest": "^29.0.3",
|
||||
"jest-environment-jsdom": "^29.0.3",
|
||||
"jest-runner-vscode": "^3.0.1",
|
||||
"lint-staged": "^13.2.0",
|
||||
"lint-staged": "^14.0.0",
|
||||
"markdownlint-cli2": "^0.6.0",
|
||||
"markdownlint-cli2-formatter-pretty": "^0.0.4",
|
||||
"mini-css-extract-plugin": "^2.6.1",
|
||||
|
||||
@@ -18,15 +18,15 @@ import { Octokit, type RestEndpointMethodTypes } from "@octokit/rest";
|
||||
import { throttling } from "@octokit/plugin-throttling";
|
||||
|
||||
import { getFiles } from "./util/files";
|
||||
import type { GitHubApiRequest } from "../src/variant-analysis/gh-api/mocks/gh-api-request";
|
||||
import { isGetVariantAnalysisRequest } from "../src/variant-analysis/gh-api/mocks/gh-api-request";
|
||||
import type { GitHubApiRequest } from "../src/common/mock-gh-api/gh-api-request";
|
||||
import { isGetVariantAnalysisRequest } from "../src/common/mock-gh-api/gh-api-request";
|
||||
import { VariantAnalysis } from "../src/variant-analysis/gh-api/variant-analysis";
|
||||
import { RepositoryWithMetadata } from "../src/variant-analysis/gh-api/repository";
|
||||
|
||||
const extensionDirectory = resolve(__dirname, "..");
|
||||
const scenariosDirectory = resolve(
|
||||
extensionDirectory,
|
||||
"src/variant-analysis/gh-api/mocks/scenarios",
|
||||
"src/common/mock-gh-api/scenarios",
|
||||
);
|
||||
|
||||
// Make sure we don't run into rate limits by automatically waiting until we can
|
||||
|
||||
@@ -22,7 +22,7 @@ const scenarioName = process.argv[2];
|
||||
const extensionDirectory = resolve(__dirname, "..");
|
||||
const scenariosDirectory = resolve(
|
||||
extensionDirectory,
|
||||
"src/variant-analysis/gh-api/mocks/scenarios",
|
||||
"src/common/mock-gh-api/scenarios",
|
||||
);
|
||||
const scenarioDirectory = resolve(scenariosDirectory, scenarioName);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ const extensionDirectory = resolve(__dirname, "..");
|
||||
const rootDirectory = resolve(extensionDirectory, "../..");
|
||||
const scenariosDirectory = resolve(
|
||||
extensionDirectory,
|
||||
"src/variant-analysis/gh-api/mocks/scenarios",
|
||||
"src/common/mock-gh-api/scenarios",
|
||||
);
|
||||
|
||||
const debug = process.env.RUNNER_DEBUG || process.argv.includes("--debug");
|
||||
@@ -19,7 +19,7 @@ async function lintScenarios() {
|
||||
const schema = createGenerator({
|
||||
path: resolve(
|
||||
extensionDirectory,
|
||||
"src/variant-analysis/gh-api/mocks/gh-api-request.ts",
|
||||
"src/common/mock-gh-api/gh-api-request.ts",
|
||||
),
|
||||
tsconfig: resolve(extensionDirectory, "tsconfig.json"),
|
||||
type: "GitHubApiRequest",
|
||||
|
||||
@@ -12,7 +12,7 @@ import type {
|
||||
} from "../variant-analysis/shared/variant-analysis";
|
||||
import type { QLDebugConfiguration } from "../debugger/debug-configuration";
|
||||
import type { QueryTreeViewItem } from "../queries-panel/query-tree-view-item";
|
||||
import type { Usage } from "../data-extensions-editor/external-api-usage";
|
||||
import type { Usage } from "../model-editor/method";
|
||||
|
||||
// A command function matching the signature that VS Code calls when
|
||||
// a command is invoked from a context menu on a TreeView with
|
||||
@@ -135,6 +135,7 @@ export type LocalQueryCommands = {
|
||||
"codeQLQueries.runLocalQueryContextMenu": TreeViewContextSingleSelectionCommandFunction<QueryTreeViewItem>;
|
||||
"codeQLQueries.runLocalQueriesContextMenu": TreeViewContextSingleSelectionCommandFunction<QueryTreeViewItem>;
|
||||
"codeQLQueries.runLocalQueriesFromPanel": TreeViewContextSingleSelectionCommandFunction<QueryTreeViewItem>;
|
||||
"codeQLQueries.createQuery": () => Promise<void>;
|
||||
"codeQL.runLocalQueryFromFileTab": (uri: Uri) => Promise<void>;
|
||||
"codeQL.runQueries": ExplorerSelectionCommandFunction<Uri>;
|
||||
"codeQL.quickEval": (uri: Uri) => Promise<void>;
|
||||
@@ -302,9 +303,9 @@ export type PackagingCommands = {
|
||||
"codeQL.downloadPacks": () => Promise<void>;
|
||||
};
|
||||
|
||||
export type DataExtensionsEditorCommands = {
|
||||
"codeQL.openDataExtensionsEditor": () => Promise<void>;
|
||||
"codeQLDataExtensionsEditor.jumpToUsageLocation": (
|
||||
export type ModelEditorCommands = {
|
||||
"codeQL.openModelEditor": () => Promise<void>;
|
||||
"codeQLModelEditor.jumpToUsageLocation": (
|
||||
usage: Usage,
|
||||
databaseItem: DatabaseItem,
|
||||
) => Promise<void>;
|
||||
@@ -347,7 +348,7 @@ export type AllExtensionCommands = BaseCommands &
|
||||
AstCfgCommands &
|
||||
AstViewerCommands &
|
||||
PackagingCommands &
|
||||
DataExtensionsEditorCommands &
|
||||
ModelEditorCommands &
|
||||
EvalLogViewerCommands &
|
||||
SummaryLanguageSupportCommands &
|
||||
Partial<TestUICommands> &
|
||||
|
||||
@@ -17,13 +17,10 @@ import {
|
||||
} from "../variant-analysis/shared/variant-analysis-filter-sort";
|
||||
import { ErrorLike } from "../common/errors";
|
||||
import { DataFlowPaths } from "../variant-analysis/shared/data-flow-paths";
|
||||
import {
|
||||
ExternalApiUsage,
|
||||
Usage,
|
||||
} from "../data-extensions-editor/external-api-usage";
|
||||
import { ModeledMethod } from "../data-extensions-editor/modeled-method";
|
||||
import { DataExtensionEditorViewState } from "../data-extensions-editor/shared/view-state";
|
||||
import { Mode } from "../data-extensions-editor/shared/mode";
|
||||
import { Method, Usage } from "../model-editor/method";
|
||||
import { ModeledMethod } from "../model-editor/modeled-method";
|
||||
import { ModelEditorViewState } from "../model-editor/shared/view-state";
|
||||
import { Mode } from "../model-editor/shared/mode";
|
||||
|
||||
/**
|
||||
* This module contains types and code that are shared between
|
||||
@@ -494,13 +491,13 @@ export type ToDataFlowPathsMessage = SetDataFlowPathsMessage;
|
||||
export type FromDataFlowPathsMessage = CommonFromViewMessages;
|
||||
|
||||
interface SetExtensionPackStateMessage {
|
||||
t: "setDataExtensionEditorViewState";
|
||||
viewState: DataExtensionEditorViewState;
|
||||
t: "setModelEditorViewState";
|
||||
viewState: ModelEditorViewState;
|
||||
}
|
||||
|
||||
interface SetExternalApiUsagesMessage {
|
||||
t: "setExternalApiUsages";
|
||||
externalApiUsages: ExternalApiUsage[];
|
||||
interface SetMethodsMessage {
|
||||
t: "setMethods";
|
||||
methods: Method[];
|
||||
}
|
||||
|
||||
interface LoadModeledMethodsMessage {
|
||||
@@ -526,6 +523,7 @@ interface SwitchModeMessage {
|
||||
|
||||
interface JumpToUsageMessage {
|
||||
t: "jumpToUsage";
|
||||
method: Method;
|
||||
usage: Usage;
|
||||
}
|
||||
|
||||
@@ -537,29 +535,29 @@ interface OpenExtensionPackMessage {
|
||||
t: "openExtensionPack";
|
||||
}
|
||||
|
||||
interface RefreshExternalApiUsages {
|
||||
t: "refreshExternalApiUsages";
|
||||
interface RefreshMethods {
|
||||
t: "refreshMethods";
|
||||
}
|
||||
|
||||
interface SaveModeledMethods {
|
||||
t: "saveModeledMethods";
|
||||
externalApiUsages: ExternalApiUsage[];
|
||||
methods: Method[];
|
||||
modeledMethods: Record<string, ModeledMethod>;
|
||||
}
|
||||
|
||||
interface GenerateExternalApiMessage {
|
||||
t: "generateExternalApi";
|
||||
interface GenerateMethodMessage {
|
||||
t: "generateMethod";
|
||||
}
|
||||
|
||||
interface GenerateExternalApiFromLlmMessage {
|
||||
t: "generateExternalApiFromLlm";
|
||||
interface GenerateMethodsFromLlmMessage {
|
||||
t: "generateMethodsFromLlm";
|
||||
packageName: string;
|
||||
externalApiUsages: ExternalApiUsage[];
|
||||
methods: Method[];
|
||||
modeledMethods: Record<string, ModeledMethod>;
|
||||
}
|
||||
|
||||
interface StopGeneratingExternalApiFromLlmMessage {
|
||||
t: "stopGeneratingExternalApiFromLlm";
|
||||
interface StopGeneratingMethodsFromLlmMessage {
|
||||
t: "stopGeneratingMethodsFromLlm";
|
||||
packageName: string;
|
||||
}
|
||||
|
||||
@@ -567,22 +565,39 @@ interface ModelDependencyMessage {
|
||||
t: "modelDependency";
|
||||
}
|
||||
|
||||
export type ToDataExtensionsEditorMessage =
|
||||
interface HideModeledApisMessage {
|
||||
t: "hideModeledApis";
|
||||
hideModeledApis: boolean;
|
||||
}
|
||||
|
||||
export type ToModelEditorMessage =
|
||||
| SetExtensionPackStateMessage
|
||||
| SetExternalApiUsagesMessage
|
||||
| SetMethodsMessage
|
||||
| LoadModeledMethodsMessage
|
||||
| AddModeledMethodsMessage
|
||||
| SetInProgressMethodsMessage;
|
||||
|
||||
export type FromDataExtensionsEditorMessage =
|
||||
export type FromModelEditorMessage =
|
||||
| ViewLoadedMsg
|
||||
| SwitchModeMessage
|
||||
| RefreshExternalApiUsages
|
||||
| RefreshMethods
|
||||
| OpenDatabaseMessage
|
||||
| OpenExtensionPackMessage
|
||||
| JumpToUsageMessage
|
||||
| SaveModeledMethods
|
||||
| GenerateExternalApiMessage
|
||||
| GenerateExternalApiFromLlmMessage
|
||||
| StopGeneratingExternalApiFromLlmMessage
|
||||
| ModelDependencyMessage;
|
||||
| GenerateMethodMessage
|
||||
| GenerateMethodsFromLlmMessage
|
||||
| StopGeneratingMethodsFromLlmMessage
|
||||
| ModelDependencyMessage
|
||||
| HideModeledApisMessage;
|
||||
|
||||
export type FromMethodModelingMessage =
|
||||
| TelemetryMessage
|
||||
| UnhandledErrorMessage;
|
||||
|
||||
interface SetMethodMessage {
|
||||
t: "setMethod";
|
||||
method: Method;
|
||||
}
|
||||
|
||||
export type ToMethodModelingMessage = SetMethodMessage;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { Repository } from "../repository";
|
||||
import { VariantAnalysis, VariantAnalysisRepoTask } from "../variant-analysis";
|
||||
import { Repository } from "../../variant-analysis/gh-api/repository";
|
||||
import {
|
||||
VariantAnalysis,
|
||||
VariantAnalysisRepoTask,
|
||||
} from "../../variant-analysis/gh-api/variant-analysis";
|
||||
|
||||
// Types that represent requests/responses from the GitHub API
|
||||
// that we need to mock.
|
||||
@@ -2,11 +2,11 @@ import { join, resolve } from "path";
|
||||
import { pathExists } from "fs-extra";
|
||||
import { setupServer, SetupServer } from "msw/node";
|
||||
|
||||
import { DisposableObject } from "../../../common/disposable-object";
|
||||
import { DisposableObject } from "../disposable-object";
|
||||
|
||||
import { Recorder } from "./recorder";
|
||||
import { createRequestHandlers } from "./request-handlers";
|
||||
import { getDirectoryNamesInsidePath } from "../../../common/files";
|
||||
import { getDirectoryNamesInsidePath } from "../files";
|
||||
|
||||
/**
|
||||
* Enables mocking of the GitHub API server via HTTP interception, using msw.
|
||||
@@ -129,11 +129,11 @@ export class MockGitHubApiServer extends DisposableObject {
|
||||
|
||||
public async getDefaultScenariosPath(): Promise<string | undefined> {
|
||||
// This should be the directory where package.json is located
|
||||
const rootDirectory = resolve(__dirname, "../../../..");
|
||||
const rootDirectory = resolve(__dirname, "../../..");
|
||||
|
||||
const scenariosPath = resolve(
|
||||
rootDirectory,
|
||||
"src/variant-analysis/gh-api/mocks/scenarios",
|
||||
"src/common/mock-gh-api/scenarios",
|
||||
);
|
||||
if (await pathExists(scenariosPath)) {
|
||||
return scenariosPath;
|
||||
@@ -8,7 +8,7 @@ import { IsomorphicResponse } from "@mswjs/interceptors";
|
||||
import { Headers } from "headers-polyfill";
|
||||
import fetch from "node-fetch";
|
||||
|
||||
import { DisposableObject } from "../../../common/disposable-object";
|
||||
import { DisposableObject } from "../disposable-object";
|
||||
|
||||
import {
|
||||
GetVariantAnalysisRepoResultRequest,
|
||||
@@ -5,7 +5,7 @@
|
||||
},
|
||||
"response": {
|
||||
"status": 200,
|
||||
"body": "file:20-getVariantAnalysisRepoResult.body.zip",
|
||||
"body": "file:19-getVariantAnalysisRepoResult.body.zip",
|
||||
"contentType": "application/zip"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user