Skip to content

Commit d6e4b7e

Browse files
committed
Merge remote-tracking branch 'origin/main' into koesie10/suggest-box-diagnostics
2 parents 4e81d41 + ac5038c commit d6e4b7e

File tree

77 files changed

+1590
-1072
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1590
-1072
lines changed

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ To see what has changed in the last few versions of the extension, see the [Chan
2121

2222
This project will track new feature development in CodeQL and, whenever appropriate, bring that functionality to the Visual Studio Code experience.
2323

24-
## Dependencies
25-
26-
This extension depends on the following two extensions for required functionality. They will be installed automatically when you install VS Code CodeQL.
27-
28-
- [Test Adapter Converter](https://marketplace.visualstudio.com/items?itemName=ms-vscode.test-adapter-converter)
29-
- [Test Explorer UI](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer)
30-
3124
## Contributing
3225

3326
This project welcomes contributions. See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to build, install, and contribute.

extensions/ql-vscode/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
## [UNRELEASED]
44

5+
- Enable collection of telemetry for the `codeQL.addingDatabases.addDatabaseSourceToWorkspace` setting. [#3238](https://github.com/github/vscode-codeql/pull/3238)
6+
- In the CodeQL model editor, you can now select individual method rows and save changes to only the selected rows, instead of having to save the entire library model. [#3156](https://github.com/github/vscode-codeql/pull/3156)
57
- If you run a query without having selected a database, we show a more intuitive prompt to help you select a database. [#3214](https://github.com/github/vscode-codeql/pull/3214)
8+
- The UI for browsing and running CodeQL tests has moved to use VS Code's built-in test UI. This makes the CodeQL test UI more consistent with the test UIs for other languages.
9+
This change means that this extension no longer depends on the "Test Explorer UI" and "Test Adapter Converter" extensions. You can uninstall those two extensions if they are
10+
not being used by any other extensions you may have installed.
11+
12+
## 1.12.0 - 11 January 2024
13+
614
- Add a prompt for downloading a GitHub database when opening a GitHub repository. [#3138](https://github.com/github/vscode-codeql/pull/3138)
715
- Avoid showing a popup when hovering over source elements in database source files. [#3125](https://github.com/github/vscode-codeql/pull/3125)
816
- Add comparison of alerts when comparing query results. This allows viewing path explanations for differences in alerts. [#3113](https://github.com/github/vscode-codeql/pull/3113)
917
- Fix a bug where the CodeQL CLI and variant analysis results were corrupted after extraction in VS Code Insiders. [#3151](https://github.com/github/vscode-codeql/pull/3151) & [#3152](https://github.com/github/vscode-codeql/pull/3152)
18+
- Show progress when extracting the CodeQL CLI distribution during installation. [#3157](https://github.com/github/vscode-codeql/pull/3157)
1019
- Add option to cancel opening the model editor. [#3189](https://github.com/github/vscode-codeql/pull/3189)
1120

1221
## 1.11.0 - 13 December 2023

extensions/ql-vscode/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ For information about other configurations, see the separate [CodeQL help](https
1717
### Quick start: Installing and configuring the extension
1818

1919
1. [Install the extension](#installing-the-extension).
20-
*Note: vscode-codeql installs the following dependencies for required functionality: [Test Adapter Converter](https://marketplace.visualstudio.com/items?itemName=ms-vscode.test-adapter-converter), [Test Explorer UI](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer).*
21-
2220
1. [Check access to the CodeQL CLI](#checking-access-to-the-codeql-cli).
2321
1. [Clone the CodeQL starter workspace](#cloning-the-codeql-starter-workspace).
2422

extensions/ql-vscode/package-lock.json

Lines changed: 87 additions & 134 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/ql-vscode/package.json

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "CodeQL for Visual Studio Code",
55
"author": "GitHub",
66
"private": true,
7-
"version": "1.11.1",
7+
"version": "1.12.1",
88
"publisher": "GitHub",
99
"license": "MIT",
1010
"icon": "media/VS-marketplace-CodeQL-icon.png",
@@ -21,7 +21,6 @@
2121
"Programming Languages"
2222
],
2323
"extensionDependencies": [
24-
"hbenl.vscode-test-explorer",
2524
"vscode.git"
2625
],
2726
"capabilities": {
@@ -546,6 +545,14 @@
546545
"command": "codeQL.runVariantAnalysisContextEditor",
547546
"title": "CodeQL: Run Variant Analysis"
548547
},
548+
{
549+
"command": "codeQL.runVariantAnalysisContextExplorer",
550+
"title": "CodeQL: Run Variant Analysis"
551+
},
552+
{
553+
"command": "codeQL.runVariantAnalysisPublishedPack",
554+
"title": "CodeQL: Run Variant Analysis against published pack"
555+
},
549556
{
550557
"command": "codeQL.exportSelectedVariantAnalysisResults",
551558
"title": "CodeQL: Export Variant Analysis Results"
@@ -1322,6 +1329,11 @@
13221329
"group": "9_qlCommands",
13231330
"when": "resourceScheme != codeql-zip-archive"
13241331
},
1332+
{
1333+
"command": "codeQL.runVariantAnalysisContextExplorer",
1334+
"group": "9_qlCommands",
1335+
"when": "resourceExtname == .ql && config.codeQL.canary && config.codeQL.variantAnalysis.multiQuery"
1336+
},
13251337
{
13261338
"command": "codeQL.openReferencedFileContextExplorer",
13271339
"group": "9_qlCommands",
@@ -1398,6 +1410,14 @@
13981410
"command": "codeQL.runVariantAnalysis",
13991411
"when": "editorLangId == ql && resourceExtname == .ql"
14001412
},
1413+
{
1414+
"command": "codeQL.runVariantAnalysisContextExplorer",
1415+
"when": "false"
1416+
},
1417+
{
1418+
"command": "codeQL.runVariantAnalysisPublishedPack",
1419+
"when": "config.codeQL.canary && config.codeQL.variantAnalysis.multiQuery"
1420+
},
14011421
{
14021422
"command": "codeQL.runVariantAnalysisContextEditor",
14031423
"when": "false"
@@ -1922,7 +1942,7 @@
19221942
"d3-graphviz": "^5.0.2",
19231943
"fs-extra": "^11.1.1",
19241944
"js-yaml": "^4.1.0",
1925-
"msw": "^2.0.11",
1945+
"msw": "^2.0.13",
19261946
"nanoid": "^5.0.1",
19271947
"node-fetch": "^2.6.7",
19281948
"p-queue": "^8.0.1",
@@ -1939,8 +1959,6 @@
19391959
"vscode-extension-telemetry": "^0.1.6",
19401960
"vscode-jsonrpc": "^8.0.2",
19411961
"vscode-languageclient": "^8.0.2",
1942-
"vscode-test-adapter-api": "^1.7.0",
1943-
"vscode-test-adapter-util": "^0.7.0",
19441962
"yauzl": "^2.10.0",
19451963
"zip-a-folder": "^3.1.3"
19461964
},
@@ -1960,11 +1978,11 @@
19601978
"@storybook/addon-links": "^7.1.0",
19611979
"@storybook/components": "^7.6.7",
19621980
"@storybook/csf": "^0.1.1",
1963-
"@storybook/manager-api": "^7.6.6",
1981+
"@storybook/manager-api": "^7.6.7",
19641982
"@storybook/react": "^7.1.0",
19651983
"@storybook/react-webpack5": "^7.6.7",
19661984
"@storybook/theming": "^7.6.7",
1967-
"@testing-library/dom": "^9.3.0",
1985+
"@testing-library/dom": "^9.3.4",
19681986
"@testing-library/jest-dom": "^6.2.0",
19691987
"@testing-library/react": "^14.0.0",
19701988
"@testing-library/user-event": "^14.5.2",
@@ -1997,7 +2015,7 @@
19972015
"@vscode/test-electron": "^2.2.0",
19982016
"@vscode/vsce": "^2.19.0",
19992017
"ansi-colors": "^4.1.1",
2000-
"applicationinsights": "^2.3.5",
2018+
"applicationinsights": "^2.9.2",
20012019
"cosmiconfig": "^9.0.0",
20022020
"cross-env": "^7.0.3",
20032021
"css-loader": "^6.8.1",
@@ -2009,7 +2027,7 @@
20092027
"eslint-plugin-github": "^4.4.1",
20102028
"eslint-plugin-import": "^2.29.1",
20112029
"eslint-plugin-jest-dom": "^5.0.1",
2012-
"eslint-plugin-prettier": "^5.0.0",
2030+
"eslint-plugin-prettier": "^5.1.3",
20132031
"eslint-plugin-react": "^7.31.8",
20142032
"eslint-plugin-react-hooks": "^4.6.0",
20152033
"eslint-plugin-storybook": "^0.6.4",

extensions/ql-vscode/scripts/find-deadcode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function ignoreFile(file: string): boolean {
99
containsPath(".storybook", file) ||
1010
containsPath(join("src", "stories"), file) ||
1111
pathsEqual(
12-
join("test", "vscode-tests", "jest-runner-installed-extensions.ts"),
12+
join("test", "vscode-tests", "jest-runner-vscode-codeql-cli.ts"),
1313
file,
1414
) ||
1515
basename(file) === "jest.config.ts" ||

extensions/ql-vscode/src/codeql-cli/cli.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ type GenerateExtensiblePredicateMetadataResult = {
121121
}>;
122122
};
123123

124+
type PackDownloadResult = {
125+
// There are other properties in this object, but they are
126+
// not relevant for its use in the extension, so we omit them.
127+
packs: Array<{
128+
name: string;
129+
version: string;
130+
}>;
131+
packDir: string;
132+
};
133+
124134
/**
125135
* The expected output of `codeql resolve qlref`.
126136
*/
@@ -1383,7 +1393,7 @@ export class CodeQLCliServer implements Disposable {
13831393
* Downloads a specified pack.
13841394
* @param packs The `<package-scope/name[@version]>` of the packs to download.
13851395
*/
1386-
async packDownload(packs: string[]) {
1396+
async packDownload(packs: string[]): Promise<PackDownloadResult> {
13871397
return this.runJsonCodeQlCliCommandWithAuthentication(
13881398
["pack", "download"],
13891399
packs,
@@ -1647,7 +1657,7 @@ function isEnvTrue(name: string): boolean {
16471657
);
16481658
}
16491659

1650-
export function shouldDebugIdeServer() {
1660+
export function shouldDebugLanguageServer() {
16511661
return isEnvTrue("IDE_SERVER_JAVA_DEBUG");
16521662
}
16531663

extensions/ql-vscode/src/codeql-cli/query-language.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function askForLanguage(
6363
.sort((a, b) => a.label.localeCompare(b.label));
6464

6565
const selectedItem = await window.showQuickPick(items, {
66-
placeHolder: "Select target language for your query",
66+
placeHolder: "Select target query language",
6767
ignoreFocusOut: true,
6868
});
6969
if (!selectedItem) {

extensions/ql-vscode/src/common/commands.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import type { CommandManager } from "../packages/commands";
2-
import type { Uri, Range, TextDocumentShowOptions } from "vscode";
2+
import type { Uri, Range, TextDocumentShowOptions, TestItem } from "vscode";
33
import type { AstItem } from "../language-support";
44
import type { DbTreeViewItem } from "../databases/ui/db-tree-view-item";
55
import type { DatabaseItem } from "../databases/local-databases";
66
import type { QueryHistoryInfo } from "../query-history/query-history-info";
7-
import type { TestTreeNode } from "../query-testing/test-tree-node";
87
import type {
98
VariantAnalysis,
109
VariantAnalysisScannedRepository,
@@ -276,9 +275,11 @@ export type VariantAnalysisCommands = {
276275
"codeQL.openVariantAnalysisView": (
277276
variantAnalysisId: number,
278277
) => Promise<void>;
279-
"codeQL.runVariantAnalysis": (uri?: Uri) => Promise<void>;
280-
"codeQL.runVariantAnalysisContextEditor": (uri?: Uri) => Promise<void>;
278+
"codeQL.runVariantAnalysis": () => Promise<void>;
279+
"codeQL.runVariantAnalysisContextEditor": (uri: Uri) => Promise<void>;
280+
"codeQL.runVariantAnalysisContextExplorer": ExplorerSelectionCommandFunction<Uri>;
281281
"codeQLQueries.runVariantAnalysisContextMenu": TreeViewContextSingleSelectionCommandFunction<QueryTreeViewItem>;
282+
"codeQL.runVariantAnalysisPublishedPack": () => Promise<void>;
282283
};
283284

284285
export type DatabasePanelCommands = {
@@ -334,11 +335,9 @@ export type SummaryLanguageSupportCommands = {
334335
};
335336

336337
export type TestUICommands = {
337-
"codeQLTests.showOutputDifferences": (node: TestTreeNode) => Promise<void>;
338-
"codeQLTests.acceptOutput": (node: TestTreeNode) => Promise<void>;
339-
"codeQLTests.acceptOutputContextTestItem": (
340-
node: TestTreeNode,
341-
) => Promise<void>;
338+
"codeQLTests.showOutputDifferences": (node: TestItem) => Promise<void>;
339+
"codeQLTests.acceptOutput": (node: TestItem) => Promise<void>;
340+
"codeQLTests.acceptOutputContextTestItem": (node: TestItem) => Promise<void>;
342341
};
343342

344343
export type MockGitHubApiServerCommands = {

extensions/ql-vscode/src/common/logging/vscode/loggers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const extLogger = new OutputChannelLogger("CodeQL Extension Log");
1111
export const queryServerLogger = new OutputChannelLogger("CodeQL Query Server");
1212

1313
// Logger for messages from the language server.
14-
export const ideServerLogger = new OutputChannelLogger(
14+
export const languageServerLogger = new OutputChannelLogger(
1515
"CodeQL Language Server",
1616
);
1717

0 commit comments

Comments
 (0)