Skip to content

Commit 52b00fe

Browse files
authored
Merge branch 'main' into starcke/commands-registration
2 parents 79d15cc + 64d97aa commit 52b00fe

45 files changed

Lines changed: 840 additions & 410 deletions

Some content is hidden

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

.github/codeql/codeql-config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: "CodeQL config"
22
queries:
33
- name: Run standard queries
44
uses: security-and-quality
5+
- name: Experimental queries
6+
uses: security-experimental
57
- name: Run custom javascript queries
68
uses: ./.github/codeql/queries
79
paths:

.vscode/settings.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,29 @@
4242
"LANG": "en-US",
4343
"TZ": "UTC"
4444
},
45+
46+
// These options are used by the `jestrunner.debug` command.
47+
// They are not used by the `jestrunner.run` command.
48+
// After clicking "debug" over a test, continually invoke the
49+
// "Debug: Attach to Node Process" command until you see a
50+
// process named "Code Helper (Plugin)". Then click "attach".
51+
// This will attach the debugger to the test process.
4552
"jestrunner.debugOptions": {
4653
// Uncomment to debug integration tests
47-
// "attachSimplePort": 9223,
54+
"attachSimplePort": 9223,
4855
"env": {
4956
"LANG": "en-US",
5057
"TZ": "UTC",
5158

5259
// Uncomment to set a custom path to a CodeQL checkout.
53-
// "TEST_CODEQL_PATH": "../codeql",
60+
// "TEST_CODEQL_PATH": "/absolute/path/to/checkout/of/codeql",
5461

5562
// Uncomment to set a custom path to a CodeQL CLI executable.
5663
// This is the CodeQL version that will be used in the tests.
57-
// "CLI_PATH": "/path/to/customg/codeql",
64+
// "CLI_PATH": "/absolute/path/to/custom/codeql",
5865

5966
// Uncomment to debug integration tests
60-
// "VSCODE_WAIT_FOR_DEBUGGER": "true",
67+
"VSCODE_WAIT_FOR_DEBUGGER": "true",
6168
}
6269
},
6370
"terminal.integrated.env.linux": {

docs/releasing.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
* Wait for the PR to be merged into `main`
2424
1. Switch to `main` branch and pull latest changes
2525
1. Lock the `main` branch.
26-
* Go to the [branch protection rules for the `main` branch](https://github.com/github/vscode-codeql/settings/branch_protection_rules/16447115)
27-
* Select "Lock branch"
28-
* Click "Save changes"
26+
* Go to the [branch protection rules for the `main` branch](https://github.com/github/vscode-codeql/settings/branch_protection_rules/16447115)
27+
* Select "Lock branch"
28+
* Click "Save changes"
2929
1. Ensure that no PRs have been merged since the release PR that you merged. If there were, you might need to unlock `main` temporarily and update the CHANGELOG again.
3030
1. Build the extension `npm run build` and install it on your VS Code using "Install from VSIX".
3131
1. Go through [our test plan](./test-plan.md) to ensure that the extension is working as expected.
@@ -40,9 +40,9 @@
4040
git tag -d badly-named-tag
4141
```
4242
1. Unlock the main branch
43-
* Go to the [branch protection rules for the `main` branch](https://github.com/github/vscode-codeql/settings/branch_protection_rules/16447115)
44-
* Deselect "Lock branch"
45-
* Click "Save changes"
43+
* Go to the [branch protection rules for the `main` branch](https://github.com/github/vscode-codeql/settings/branch_protection_rules/16447115)
44+
* Deselect "Lock branch"
45+
* Click "Save changes"
4646
1. Push the new tag up:
4747
4848
a. If you're using a fork of the repo:
@@ -86,4 +86,4 @@ To regenerate the Open VSX token:
8686
1. Go to the [Access Tokens](https://open-vsx.org/user-settings/tokens) page and generate a new token.
8787
1. Update the secret in the `publish-open-vsx` environment in the project settings.
8888
89-
To regenerate the VSCode Marketplace token, please see our internal documentation. Note that Azure DevOps PATs expire every 90 days and must be regenerated.
89+
To regenerate the VSCode Marketplace token, please see our internal documentation. Note that Azure DevOps PATs expire every 90 days and must be regenerated.

extensions/ql-vscode/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# CodeQL for Visual Studio Code: Changelog
22

3-
## 1.8.0 - 8 March 2023
3+
## [UNRELEASED]
4+
5+
## 1.8.0 - 9 March 2023
46

57
- Send telemetry about unhandled errors happening within the extension. [#2125](https://github.com/github/vscode-codeql/pull/2125)
68
- Enable multi-repository variant analysis. [#2144](https://github.com/github/vscode-codeql/pull/2144)

extensions/ql-vscode/gulpfile.ts/deploy.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,6 @@ export async function deployPackage(
9393
);
9494
await copyPackage(sourcePath, distPath);
9595

96-
// This is necessary for vsce to know the dependencies
97-
await copyDirectory(
98-
resolve(sourcePath, "node_modules"),
99-
resolve(distPath, "node_modules"),
100-
);
101-
10296
return {
10397
distPath,
10498
name: packageJson.name,

extensions/ql-vscode/gulpfile.ts/package.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export async function packageExtension(): Promise<void> {
1717
"..",
1818
`${deployedPackage.name}-${deployedPackage.version}.vsix`,
1919
),
20+
"--no-dependencies",
2021
];
2122
const proc = spawn(resolve(__dirname, "../node_modules/.bin/vsce"), args, {
2223
cwd: deployedPackage.distPath,

extensions/ql-vscode/package-lock.json

Lines changed: 2 additions & 3 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: 86 additions & 28 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.8.0",
7+
"version": "1.8.1",
88
"publisher": "GitHub",
99
"license": "MIT",
1010
"icon": "media/VS-marketplace-CodeQL-icon.png",
@@ -44,11 +44,6 @@
4444
"onView:test-explorer",
4545
"onCommand:codeQL.checkForUpdatesToCLI",
4646
"onCommand:codeQL.authenticateToGitHub",
47-
"onCommand:codeQLDatabases.chooseDatabaseFolder",
48-
"onCommand:codeQLDatabases.chooseDatabaseArchive",
49-
"onCommand:codeQLDatabases.chooseDatabaseInternet",
50-
"onCommand:codeQLDatabases.chooseDatabaseGithub",
51-
"onCommand:codeQL.setCurrentDatabase",
5247
"onCommand:codeQL.viewAst",
5348
"onCommand:codeQL.viewCfg",
5449
"onCommand:codeQL.openReferencedFile",
@@ -57,16 +52,6 @@
5752
"onCommand:codeQL.chooseDatabaseArchive",
5853
"onCommand:codeQL.chooseDatabaseInternet",
5954
"onCommand:codeQL.chooseDatabaseGithub",
60-
"onCommand:codeQLDatabases.chooseDatabase",
61-
"onCommand:codeQLDatabases.setCurrentDatabase",
62-
"onCommand:codeQLVariantAnalysisRepositories.openConfigFile",
63-
"onCommand:codeQLVariantAnalysisRepositories.addNewDatabase",
64-
"onCommand:codeQLVariantAnalysisRepositories.addNewList",
65-
"onCommand:codeQLVariantAnalysisRepositories.setSelectedItem",
66-
"onCommand:codeQLVariantAnalysisRepositories.setSelectedItemContextMenu",
67-
"onCommand:codeQLVariantAnalysisRepositories.renameItemContextMenu",
68-
"onCommand:codeQLVariantAnalysisRepositories.openOnGitHubContextMenu",
69-
"onCommand:codeQLVariantAnalysisRepositories.removeItemContextMenu",
7055
"onCommand:codeQL.quickQuery",
7156
"onCommand:codeQL.restartQueryServer",
7257
"onWebviewPanel:resultsView",
@@ -239,6 +224,19 @@
239224
"default": true,
240225
"description": "Enable the 'Quick Evaluation' CodeLens."
241226
},
227+
"codeQL.runningQueries.useExtensionPacks": {
228+
"type": "string",
229+
"default": "none",
230+
"enum": [
231+
"none",
232+
"all"
233+
],
234+
"enumDescriptions": [
235+
"Do not use extension packs.",
236+
"Use all extension packs found in the workspace."
237+
],
238+
"description": "Choose whether or not to run queries using extension packs. Requires CodeQL CLI v2.12.3 or later."
239+
},
242240
"codeQL.resultsDisplay.pageSize": {
243241
"type": "integer",
244242
"default": 200,
@@ -322,6 +320,10 @@
322320
"command": "codeQL.runVariantAnalysis",
323321
"title": "CodeQL: Run Variant Analysis"
324322
},
323+
{
324+
"command": "codeQL.runVariantAnalysisContextEditor",
325+
"title": "CodeQL: Run Variant Analysis"
326+
},
325327
{
326328
"command": "codeQL.exportSelectedVariantAnalysisResults",
327329
"title": "CodeQL: Export Variant Analysis Results"
@@ -334,10 +336,22 @@
334336
"command": "codeQL.quickEval",
335337
"title": "CodeQL: Quick Evaluation"
336338
},
339+
{
340+
"command": "codeQL.quickEvalContextEditor",
341+
"title": "CodeQL: Quick Evaluation"
342+
},
337343
{
338344
"command": "codeQL.openReferencedFile",
339345
"title": "CodeQL: Open Referenced File"
340346
},
347+
{
348+
"command": "codeQL.openReferencedFileContextEditor",
349+
"title": "CodeQL: Open Referenced File"
350+
},
351+
{
352+
"command": "codeQL.openReferencedFileContextExplorer",
353+
"title": "CodeQL: Open Referenced File"
354+
},
341355
{
342356
"command": "codeQL.previewQueryHelp",
343357
"title": "CodeQL: Preview Query Help"
@@ -433,10 +447,26 @@
433447
"command": "codeQL.viewAst",
434448
"title": "CodeQL: View AST"
435449
},
450+
{
451+
"command": "codeQL.viewAstContextExplorer",
452+
"title": "CodeQL: View AST"
453+
},
454+
{
455+
"command": "codeQL.viewAstContextEditor",
456+
"title": "CodeQL: View AST"
457+
},
436458
{
437459
"command": "codeQL.viewCfg",
438460
"title": "CodeQL: View CFG"
439461
},
462+
{
463+
"command": "codeQL.viewCfgContextExplorer",
464+
"title": "CodeQL: View CFG"
465+
},
466+
{
467+
"command": "codeQL.viewCfgContextEditor",
468+
"title": "CodeQL: View CFG"
469+
},
440470
{
441471
"command": "codeQL.upgradeCurrentDatabase",
442472
"title": "CodeQL: Upgrade Current Database"
@@ -825,12 +855,12 @@
825855
{
826856
"command": "codeQLQueryHistory.removeHistoryItem",
827857
"group": "7_queryHistory@0",
828-
"when": "viewItem == interpretedResultsItem || viewItem == rawResultsItem || viewItem == remoteResultsItem || viewItem == cancelledResultsItem || viewItem == cancelledRemoteResultsItem"
858+
"when": "viewItem == interpretedResultsItem || viewItem == rawResultsItem || viewItem == remoteResultsItem || viewItem == cancelledRemoteResultsItemWithoutLogs || viewItem == cancelledResultsItem || viewItem == cancelledRemoteResultsItem"
829859
},
830860
{
831861
"command": "codeQLQueryHistory.removeHistoryItem",
832862
"group": "inline",
833-
"when": "viewItem == interpretedResultsItem || viewItem == rawResultsItem || viewItem == remoteResultsItem || viewItem == cancelledResultsItem || viewItem == cancelledRemoteResultsItem"
863+
"when": "viewItem == interpretedResultsItem || viewItem == rawResultsItem || viewItem == remoteResultsItem || viewItem == cancelledRemoteResultsItemWithoutLogs || viewItem == cancelledResultsItem || viewItem == cancelledRemoteResultsItem"
834864
},
835865
{
836866
"command": "codeQLQueryHistory.renameItem",
@@ -930,12 +960,12 @@
930960
"when": "resourceScheme == codeql-zip-archive || explorerResourceIsFolder || resourceExtname == .zip"
931961
},
932962
{
933-
"command": "codeQL.viewAst",
963+
"command": "codeQL.viewAstContextExplorer",
934964
"group": "9_qlCommands",
935965
"when": "resourceScheme == codeql-zip-archive && !explorerResourceIsFolder && !listMultiSelection"
936966
},
937967
{
938-
"command": "codeQL.viewCfg",
968+
"command": "codeQL.viewCfgContextExplorer",
939969
"group": "9_qlCommands",
940970
"when": "resourceScheme == codeql-zip-archive && config.codeQL.canary"
941971
},
@@ -945,7 +975,7 @@
945975
"when": "resourceScheme != codeql-zip-archive"
946976
},
947977
{
948-
"command": "codeQL.openReferencedFile",
978+
"command": "codeQL.openReferencedFileContextExplorer",
949979
"group": "9_qlCommands",
950980
"when": "resourceExtname == .qlref"
951981
},
@@ -981,7 +1011,8 @@
9811011
"when": "editorLangId == ql && resourceExtname == .ql"
9821012
},
9831013
{
984-
"command": "codeQL.exportSelectedVariantAnalysisResults"
1014+
"command": "codeQL.runVariantAnalysisContextEditor",
1015+
"when": "false"
9851016
},
9861017
{
9871018
"command": "codeQL.runQueries",
@@ -991,10 +1022,22 @@
9911022
"command": "codeQL.quickEval",
9921023
"when": "editorLangId == ql"
9931024
},
1025+
{
1026+
"command": "codeQL.quickEvalContextEditor",
1027+
"when": "false"
1028+
},
9941029
{
9951030
"command": "codeQL.openReferencedFile",
9961031
"when": "resourceExtname == .qlref"
9971032
},
1033+
{
1034+
"command": "codeQL.openReferencedFileContextEditor",
1035+
"when": "false"
1036+
},
1037+
{
1038+
"command": "codeQL.openReferencedFileContextExplorer",
1039+
"when": "false"
1040+
},
9981041
{
9991042
"command": "codeQL.previewQueryHelp",
10001043
"when": "resourceExtname == .qhelp && isWorkspaceTrusted"
@@ -1007,10 +1050,26 @@
10071050
"command": "codeQL.viewAst",
10081051
"when": "resourceScheme == codeql-zip-archive"
10091052
},
1053+
{
1054+
"command": "codeQL.viewAstContextEditor",
1055+
"when": "false"
1056+
},
1057+
{
1058+
"command": "codeQL.viewAstContextExplorer",
1059+
"when": "false"
1060+
},
10101061
{
10111062
"command": "codeQL.viewCfg",
10121063
"when": "resourceScheme == codeql-zip-archive && config.codeQL.canary"
10131064
},
1065+
{
1066+
"command": "codeQL.viewCfgContextExplorer",
1067+
"when": "false"
1068+
},
1069+
{
1070+
"command": "codeQL.viewCfgContextEditor",
1071+
"when": "false"
1072+
},
10141073
{
10151074
"command": "codeQLVariantAnalysisRepositories.openConfigFile",
10161075
"when": "false"
@@ -1234,23 +1293,23 @@
12341293
"when": "editorLangId == ql && resourceExtname == .ql"
12351294
},
12361295
{
1237-
"command": "codeQL.runVariantAnalysis",
1296+
"command": "codeQL.runVariantAnalysisContextEditor",
12381297
"when": "editorLangId == ql && resourceExtname == .ql"
12391298
},
12401299
{
1241-
"command": "codeQL.viewAst",
1300+
"command": "codeQL.viewAstContextEditor",
12421301
"when": "resourceScheme == codeql-zip-archive"
12431302
},
12441303
{
1245-
"command": "codeQL.viewCfg",
1304+
"command": "codeQL.viewCfgContextEditor",
12461305
"when": "resourceScheme == codeql-zip-archive && config.codeQL.canary"
12471306
},
12481307
{
1249-
"command": "codeQL.quickEval",
1308+
"command": "codeQL.quickEvalContextEditor",
12501309
"when": "editorLangId == ql"
12511310
},
12521311
{
1253-
"command": "codeQL.openReferencedFile",
1312+
"command": "codeQL.openReferencedFileContextEditor",
12541313
"when": "resourceExtname == .qlref"
12551314
},
12561315
{
@@ -1439,7 +1498,6 @@
14391498
"@vscode/vsce": "^2.15.0",
14401499
"ansi-colors": "^4.1.1",
14411500
"applicationinsights": "^2.3.5",
1442-
"babel-loader": "^8.2.5",
14431501
"cross-env": "^7.0.3",
14441502
"css-loader": "~3.1.0",
14451503
"del": "^6.0.0",

0 commit comments

Comments
 (0)