Skip to content

Commit 9184bde

Browse files
Merge branch 'main' into robertbrignull/logged_error_telemetry
2 parents 1120f2f + 9f240c8 commit 9184bde

43 files changed

Lines changed: 1091 additions & 757 deletions

Some content is hidden

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

.github/workflows/release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,15 @@ jobs:
122122
perl -i -pe 's/^/## \[UNRELEASED\]\n\n/ if($.==3)' CHANGELOG.md
123123
124124
- name: Create version bump PR
125-
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4.2.3
125+
uses: ./.github/actions/create-pr
126126
if: success()
127127
with:
128128
token: ${{ secrets.GITHUB_TOKEN }}
129129
commit-message: Bump version to ${{ steps.bump-patch-version.outputs.next_version }}
130130
title: Bump version to ${{ steps.bump-patch-version.outputs.next_version }}
131131
body: This PR was automatically generated by the GitHub Actions release workflow in this repository.
132-
branch: ${{ format('version/bump-to-{0}', steps.bump-patch-version.outputs.next_version) }}
133-
base: main
134-
draft: true
132+
head-branch: ${{ format('version/bump-to-{0}', steps.bump-patch-version.outputs.next_version) }}
133+
base-branch: main
135134

136135
vscode-publish:
137136
name: Publish to VS Code Marketplace

extensions/ql-vscode/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.vscode-test/
22
node_modules/
33
out/
4+
build/
45

56
# Include the Storybook config
67
!.storybook

extensions/ql-vscode/.eslintrc.js

Lines changed: 115 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
module.exports = {
1+
const { resolve } = require("path");
2+
3+
const baseConfig = {
24
parser: "@typescript-eslint/parser",
35
parserOptions: {
46
ecmaVersion: 2018,
57
sourceType: "module",
6-
project: ["tsconfig.json", "./src/**/tsconfig.json", "./test/**/tsconfig.json", "./gulpfile.ts/tsconfig.json", "./scripts/tsconfig.json", "./.storybook/tsconfig.json"],
8+
project: [
9+
resolve(__dirname, "tsconfig.lint.json"),
10+
resolve(__dirname, "src/**/tsconfig.json"),
11+
resolve(__dirname, "test/**/tsconfig.json"),
12+
resolve(__dirname, "gulpfile.ts/tsconfig.json"),
13+
resolve(__dirname, "scripts/tsconfig.json"),
14+
resolve(__dirname, ".storybook/tsconfig.json"),
15+
],
716
},
8-
plugins: [
9-
"github",
10-
"@typescript-eslint",
11-
"etc"
12-
],
17+
plugins: ["github", "@typescript-eslint", "etc"],
1318
env: {
1419
node: true,
1520
es6: true,
@@ -21,7 +26,7 @@ module.exports = {
2126
"plugin:github/typescript",
2227
"plugin:jest-dom/recommended",
2328
"plugin:prettier/recommended",
24-
"plugin:@typescript-eslint/recommended"
29+
"plugin:@typescript-eslint/recommended",
2530
],
2631
rules: {
2732
"@typescript-eslint/no-use-before-define": 0,
@@ -37,14 +42,14 @@ module.exports = {
3742
"@typescript-eslint/explicit-module-boundary-types": "off",
3843
"@typescript-eslint/no-non-null-assertion": "off",
3944
"@typescript-eslint/no-explicit-any": "off",
40-
"@typescript-eslint/no-floating-promises": [ "error", { ignoreVoid: true } ],
45+
"@typescript-eslint/no-floating-promises": ["error", { ignoreVoid: true }],
4146
"@typescript-eslint/no-invalid-this": "off",
4247
"@typescript-eslint/no-shadow": "off",
4348
"prefer-const": ["warn", { destructuring: "all" }],
4449
"@typescript-eslint/no-throw-literal": "error",
4550
"no-useless-escape": 0,
46-
"camelcase": "off",
47-
"eqeqeq": "off",
51+
camelcase: "off",
52+
eqeqeq: "off",
4853
"escompat/no-regexp-lookbehind": "off",
4954
"etc/no-implicit-any-catch": "error",
5055
"filenames/match-regex": "off",
@@ -72,3 +77,102 @@ module.exports = {
7277
"github/no-then": "off",
7378
},
7479
};
80+
81+
module.exports = {
82+
root: true,
83+
...baseConfig,
84+
overrides: [
85+
{
86+
files: ["src/stories/**/*"],
87+
parserOptions: {
88+
project: resolve(__dirname, "src/stories/tsconfig.json"),
89+
},
90+
extends: [
91+
...baseConfig.extends,
92+
"plugin:react/recommended",
93+
"plugin:react-hooks/recommended",
94+
"plugin:storybook/recommended",
95+
],
96+
rules: {
97+
...baseConfig.rules,
98+
},
99+
settings: {
100+
react: {
101+
version: "detect",
102+
},
103+
},
104+
},
105+
{
106+
files: ["src/view/**/*"],
107+
parserOptions: {
108+
project: resolve(__dirname, "src/view/tsconfig.json"),
109+
},
110+
extends: [
111+
...baseConfig.extends,
112+
"plugin:react/recommended",
113+
"plugin:react-hooks/recommended",
114+
],
115+
rules: {
116+
...baseConfig.rules,
117+
},
118+
settings: {
119+
react: {
120+
version: "detect",
121+
},
122+
},
123+
},
124+
{
125+
files: ["test/**/*"],
126+
parserOptions: {
127+
project: resolve(__dirname, "test/tsconfig.json"),
128+
},
129+
env: {
130+
jest: true,
131+
},
132+
},
133+
{
134+
files: ["test/vscode-tests/**/*"],
135+
parserOptions: {
136+
project: resolve(__dirname, "test/tsconfig.json"),
137+
},
138+
env: {
139+
jest: true,
140+
},
141+
rules: {
142+
...baseConfig.rules,
143+
"@typescript-eslint/ban-types": [
144+
"error",
145+
{
146+
// For a full list of the default banned types, see:
147+
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md
148+
extendDefaults: true,
149+
types: {
150+
// Don't complain about the `Function` type in test files. (Default is `true`.)
151+
Function: false,
152+
},
153+
},
154+
],
155+
},
156+
},
157+
{
158+
files: [
159+
".eslintrc.js",
160+
"test/**/jest-runner-vscode.config.js",
161+
"test/**/jest-runner-vscode.config.base.js",
162+
],
163+
parser: undefined,
164+
plugins: ["github"],
165+
extends: [
166+
"eslint:recommended",
167+
"plugin:github/recommended",
168+
"plugin:prettier/recommended",
169+
],
170+
rules: {
171+
"import/no-commonjs": "off",
172+
"prefer-template": "off",
173+
"filenames/match-regex": "off",
174+
"@typescript-eslint/no-var-requires": "off",
175+
},
176+
},
177+
],
178+
};

extensions/ql-vscode/package.json

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@
395395
},
396396
{
397397
"command": "codeQLVariantAnalysisRepositories.removeItemContextMenu",
398-
"title": "Remove"
398+
"title": "Delete"
399399
},
400400
{
401401
"command": "codeQLDatabases.chooseDatabaseFolder",
@@ -523,7 +523,7 @@
523523
},
524524
{
525525
"command": "codeQLQueryHistory.openQuery",
526-
"title": "Open Query",
526+
"title": "View Query",
527527
"icon": "$(edit)"
528528
},
529529
{
@@ -533,7 +533,7 @@
533533
},
534534
{
535535
"command": "codeQLQueryHistory.removeHistoryItem",
536-
"title": "Remove from History",
536+
"title": "Delete",
537537
"icon": "$(trash)"
538538
},
539539
{
@@ -550,11 +550,11 @@
550550
},
551551
{
552552
"command": "codeQLQueryHistory.showQueryLog",
553-
"title": "Show Query Log"
553+
"title": "View Query Log"
554554
},
555555
{
556556
"command": "codeQLQueryHistory.openQueryDirectory",
557-
"title": "Open Query Directory"
557+
"title": "Open Results Directory"
558558
},
559559
{
560560
"command": "codeQLQueryHistory.showEvalLog",
@@ -574,7 +574,7 @@
574574
},
575575
{
576576
"command": "codeQLQueryHistory.showQueryText",
577-
"title": "Show Query Text"
577+
"title": "View Query Text"
578578
},
579579
{
580580
"command": "codeQLQueryHistory.exportResults",
@@ -597,16 +597,16 @@
597597
"title": "View DIL"
598598
},
599599
{
600-
"command": "codeQLQueryHistory.setLabel",
601-
"title": "Set Label"
600+
"command": "codeQLQueryHistory.renameItem",
601+
"title": "Rename"
602602
},
603603
{
604604
"command": "codeQLQueryHistory.compareWith",
605605
"title": "Compare Results"
606606
},
607607
{
608608
"command": "codeQLQueryHistory.openOnGithub",
609-
"title": "Open Variant Analysis on GitHub"
609+
"title": "View Logs"
610610
},
611611
{
612612
"command": "codeQLQueryHistory.copyRepoList",
@@ -827,57 +827,62 @@
827827
},
828828
{
829829
"command": "codeQLQueryHistory.openQuery",
830-
"group": "9_qlCommands",
830+
"group": "2_queryHistory@0",
831831
"when": "view == codeQLQueryHistory"
832832
},
833833
{
834834
"command": "codeQLQueryHistory.removeHistoryItem",
835-
"group": "9_qlCommands",
835+
"group": "7_queryHistory@0",
836836
"when": "viewItem == interpretedResultsItem || viewItem == rawResultsItem || viewItem == remoteResultsItem || viewItem == cancelledResultsItem || viewItem == cancelledRemoteResultsItem"
837837
},
838838
{
839-
"command": "codeQLQueryHistory.setLabel",
840-
"group": "9_qlCommands",
839+
"command": "codeQLQueryHistory.removeHistoryItem",
840+
"group": "inline",
841+
"when": "viewItem == interpretedResultsItem || viewItem == rawResultsItem || viewItem == remoteResultsItem || viewItem == cancelledResultsItem || viewItem == cancelledRemoteResultsItem"
842+
},
843+
{
844+
"command": "codeQLQueryHistory.renameItem",
845+
"group": "6_queryHistory@0",
841846
"when": "view == codeQLQueryHistory"
842847
},
843848
{
844849
"command": "codeQLQueryHistory.compareWith",
845-
"group": "9_qlCommands",
850+
"group": "3_queryHistory@0",
846851
"when": "viewItem == rawResultsItem || viewItem == interpretedResultsItem"
847852
},
848853
{
849854
"command": "codeQLQueryHistory.showQueryLog",
850-
"group": "9_qlCommands",
855+
"group": "4_queryHistory@4",
851856
"when": "viewItem == rawResultsItem || viewItem == interpretedResultsItem"
852857
},
853858
{
854859
"command": "codeQLQueryHistory.openQueryDirectory",
855-
"group": "9_qlCommands",
860+
"group": "2_queryHistory@4",
856861
"when": "view == codeQLQueryHistory && !hasRemoteServer"
857862
},
858863
{
859864
"command": "codeQLQueryHistory.showEvalLog",
860-
"group": "9_qlCommands",
865+
"group": "4_queryHistory@1",
861866
"when": "codeql.supportsEvalLog && viewItem == rawResultsItem || codeql.supportsEvalLog && viewItem == interpretedResultsItem || codeql.supportsEvalLog && viewItem == cancelledResultsItem"
862867
},
863868
{
864869
"command": "codeQLQueryHistory.showEvalLogSummary",
865-
"group": "9_qlCommands",
870+
"group": "4_queryHistory@2",
866871
"when": "codeql.supportsEvalLog && viewItem == rawResultsItem || codeql.supportsEvalLog && viewItem == interpretedResultsItem || codeql.supportsEvalLog && viewItem == cancelledResultsItem"
867872
},
868873
{
869874
"command": "codeQLQueryHistory.showEvalLogViewer",
870-
"group": "9_qlCommands",
875+
"group": "4_queryHistory@3",
871876
"when": "config.codeQL.canary && codeql.supportsEvalLog && viewItem == rawResultsItem || config.codeQL.canary && codeql.supportsEvalLog && viewItem == interpretedResultsItem || config.codeQL.canary && codeql.supportsEvalLog && viewItem == cancelledResultsItem"
872877
},
873878
{
874879
"command": "codeQLQueryHistory.showQueryText",
875-
"group": "9_qlCommands",
880+
"group": "2_queryHistory@2",
876881
"when": "view == codeQLQueryHistory"
877882
},
878883
{
879884
"command": "codeQLQueryHistory.exportResults",
880-
"group": "9_qlCommands",
885+
"group": "1_queryHistory@0",
881886
"when": "view == codeQLQueryHistory && viewItem == remoteResultsItem"
882887
},
883888
{
@@ -887,17 +892,17 @@
887892
},
888893
{
889894
"command": "codeQLQueryHistory.viewCsvAlerts",
890-
"group": "9_qlCommands",
895+
"group": "5_queryHistory@0",
891896
"when": "viewItem == interpretedResultsItem"
892897
},
893898
{
894899
"command": "codeQLQueryHistory.viewSarifAlerts",
895-
"group": "9_qlCommands",
900+
"group": "5_queryHistory@1",
896901
"when": "viewItem == interpretedResultsItem"
897902
},
898903
{
899904
"command": "codeQLQueryHistory.viewDil",
900-
"group": "9_qlCommands",
905+
"group": "5_queryHistory@2",
901906
"when": "viewItem == rawResultsItem || viewItem == interpretedResultsItem"
902907
},
903908
{
@@ -907,12 +912,12 @@
907912
},
908913
{
909914
"command": "codeQLQueryHistory.openOnGithub",
910-
"group": "9_qlCommands",
915+
"group": "2_queryHistory@3",
911916
"when": "viewItem == remoteResultsItem || viewItem == inProgressRemoteResultsItem || viewItem == cancelledRemoteResultsItem"
912917
},
913918
{
914919
"command": "codeQLQueryHistory.copyRepoList",
915-
"group": "9_qlCommands",
920+
"group": "1_queryHistory@1",
916921
"when": "viewItem == remoteResultsItem"
917922
},
918923
{
@@ -1160,7 +1165,7 @@
11601165
"when": "false"
11611166
},
11621167
{
1163-
"command": "codeQLQueryHistory.setLabel",
1168+
"command": "codeQLQueryHistory.renameItem",
11641169
"when": "false"
11651170
},
11661171
{
@@ -1310,6 +1315,11 @@
13101315
{
13111316
"view": "codeQLEvalLogViewer",
13121317
"contents": "Run the 'Show Evaluator Log (UI)' command on a CodeQL query run in the Query History view."
1318+
},
1319+
{
1320+
"view": "codeQLVariantAnalysisRepositories",
1321+
"contents": "Set up a controller repository to start using variant analysis.\n[Set up controller repository](command:codeQLVariantAnalysisRepositories.setupControllerRepository)",
1322+
"when": "!config.codeQL.variantAnalysis.controllerRepo"
13131323
}
13141324
]
13151325
},
@@ -1325,7 +1335,7 @@
13251335
"cli-integration": "jest --projects test/vscode-tests/cli-integration",
13261336
"update-vscode": "node ./node_modules/vscode/bin/install",
13271337
"format": "prettier --write **/*.{ts,tsx} && eslint . --ext .ts,.tsx --fix",
1328-
"lint": "eslint . --ext .ts,.tsx --max-warnings=0",
1338+
"lint": "eslint . --ext .js,.ts,.tsx --max-warnings=0",
13291339
"format-staged": "lint-staged",
13301340
"storybook": "start-storybook -p 6006",
13311341
"build-storybook": "build-storybook",

0 commit comments

Comments
 (0)