Skip to content

Commit 66a1e00

Browse files
authored
Merge branch 'main' into terminal-si-help-duration-199170
2 parents 9a61ab7 + 7e0c93c commit 66a1e00

File tree

1,878 files changed

+52737
-26491
lines changed

Some content is hidden

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

1,878 files changed

+52737
-26491
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import * as eslint from 'eslint';
7+
import { Node } from 'estree';
8+
9+
export = new class EnsureNoDisposablesAreLeakedInTestSuite implements eslint.Rule.RuleModule {
10+
11+
readonly meta: eslint.Rule.RuleMetaData = {
12+
type: 'problem',
13+
messages: {
14+
ensure: 'Suites should include a call to `ensureNoDisposablesAreLeakedInTestSuite()` to ensure no disposables are leaked in tests.'
15+
}
16+
};
17+
18+
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
19+
const config = <{ exclude: string[] }>context.options[0];
20+
21+
const needle = context.getFilename().replace(/\\/g, '/');
22+
if (config.exclude.some((e) => needle.endsWith(e))) {
23+
return {};
24+
}
25+
26+
return {
27+
[`Program > ExpressionStatement > CallExpression[callee.name='suite']`]: (node: Node) => {
28+
const src = context.getSourceCode().getText(node)
29+
if (!src.includes('ensureNoDisposablesAreLeakedInTestSuite(')) {
30+
context.report({
31+
node,
32+
messageId: 'ensure',
33+
});
34+
}
35+
},
36+
};
37+
}
38+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import * as eslint from 'eslint';
7+
8+
export = new class NoAsyncSuite implements eslint.Rule.RuleModule {
9+
10+
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
11+
function doesCallSuperDispose(node: any) {
12+
13+
if (!node.override) {
14+
return;
15+
}
16+
17+
const body = context.getSourceCode().getText(node)
18+
19+
if (body.includes('super.dispose')) {
20+
return;
21+
}
22+
23+
context.report({
24+
node,
25+
message: 'dispose() should call super.dispose()'
26+
});
27+
}
28+
29+
return {
30+
['MethodDefinition[override][key.name="dispose"]']: doesCallSuperDispose,
31+
};
32+
}
33+
};

.eslintrc.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"local/code-no-nls-in-standalone-editor": "warn",
7474
"local/code-no-standalone-editor": "warn",
7575
"local/code-no-unexternalized-strings": "warn",
76+
"local/code-must-use-super-dispose": "warn",
7677
"local/code-declare-service-brand": "warn",
7778
"local/code-layering": [
7879
"warn",
@@ -119,6 +120,7 @@
119120
"**/*.test.ts"
120121
],
121122
"rules": {
123+
"local/code-must-use-super-dispose": "off",
122124
"local/code-no-test-only": "error",
123125
"local/code-no-test-async-suite": "warn",
124126
"local/code-no-unexternalized-strings": "off",
@@ -136,6 +138,52 @@
136138
]
137139
}
138140
},
141+
{
142+
"files": [
143+
"src/vs/**/*.test.ts"
144+
],
145+
"rules": {
146+
"local/code-ensure-no-disposables-leak-in-test": [
147+
"warn",
148+
{
149+
// Files should (only) be removed from the list they adopt the leak detector
150+
"exclude": [
151+
"src/vs/base/test/browser/browser.test.ts",
152+
"src/vs/base/test/browser/ui/scrollbar/scrollableElement.test.ts",
153+
"src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts",
154+
"src/vs/editor/contrib/codeAction/test/browser/codeActionModel.test.ts",
155+
"src/vs/editor/test/common/services/languageService.test.ts",
156+
"src/vs/editor/test/node/classification/typescript.test.ts",
157+
"src/vs/editor/test/node/diffing/defaultLinesDiffComputer.test.ts",
158+
"src/vs/editor/test/node/diffing/fixtures.test.ts",
159+
"src/vs/platform/configuration/test/common/configuration.test.ts",
160+
"src/vs/platform/extensions/test/common/extensionValidator.test.ts",
161+
"src/vs/platform/opener/test/common/opener.test.ts",
162+
"src/vs/platform/registry/test/common/platform.test.ts",
163+
"src/vs/platform/remote/test/common/remoteHosts.test.ts",
164+
"src/vs/platform/telemetry/test/browser/1dsAppender.test.ts",
165+
"src/vs/platform/workspace/test/common/workspace.test.ts",
166+
"src/vs/platform/workspaces/test/electron-main/workspaces.test.ts",
167+
"src/vs/workbench/api/test/browser/mainThreadConfiguration.test.ts",
168+
"src/vs/workbench/api/test/common/extHostExtensionActivator.test.ts",
169+
"src/vs/workbench/api/test/node/extHostTunnelService.test.ts",
170+
"src/vs/workbench/contrib/bulkEdit/test/browser/bulkCellEdits.test.ts",
171+
"src/vs/workbench/contrib/chat/test/common/chatWordCounter.test.ts",
172+
"src/vs/workbench/contrib/editSessions/test/browser/editSessions.test.ts",
173+
"src/vs/workbench/contrib/extensions/test/common/extensionQuery.test.ts",
174+
"src/vs/workbench/contrib/notebook/test/browser/notebookExecutionService.test.ts",
175+
"src/vs/workbench/contrib/notebook/test/browser/notebookExecutionStateService.test.ts",
176+
"src/vs/workbench/contrib/tasks/test/common/problemMatcher.test.ts",
177+
"src/vs/workbench/contrib/tasks/test/common/taskConfiguration.test.ts",
178+
"src/vs/workbench/services/commands/test/common/commandService.test.ts",
179+
"src/vs/workbench/services/extensions/test/common/extensionDescriptionRegistry.test.ts",
180+
"src/vs/workbench/services/userActivity/test/browser/domActivityTracker.test.ts",
181+
"src/vs/workbench/test/browser/quickAccess.test.ts"
182+
]
183+
}
184+
]
185+
}
186+
},
139187
{
140188
"files": [
141189
"**/vscode.d.ts",

.github/classifier.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"editor-autoindent": {"assign": ["rebornix"]},
4040
"editor-bracket-matching": {"assign": ["hediet"]},
4141
"editor-clipboard": {"assign": ["alexdima", "rebornix"]},
42-
"editor-code-actions": {"assign": ["mjbvz"]},
42+
"editor-code-actions": {"assign": ["mjbvz", "justschen"]},
4343
"editor-color-picker": {"assign": ["aiday-mar"]},
4444
"editor-columnselect": {"assign": ["alexdima"]},
4545
"editor-commands": {"assign": ["alexdima"]},
@@ -111,7 +111,7 @@
111111
"interactive-window": {"assign": ["amunger", "rebornix"]},
112112
"ipc": {"assign": ["joaomoreno"]},
113113
"issue-bot": {"assign": ["chrmarti"]},
114-
"issue-reporter": {"assign": ["TylerLeonhardt"]},
114+
"issue-reporter": {"assign": ["justschen"]},
115115
"javascript": {"assign": ["mjbvz"]},
116116
"json": {"assign": ["aeschli"]},
117117
"json-sorting": {"assign": ["aiday-mar"]},
@@ -253,6 +253,7 @@
253253
"tokenization": {"assign": ["alexdima"]},
254254
"touch/pointer": {"assign": []},
255255
"trackpad/scroll": {"assign": []},
256+
"tree-sticky-scroll": {"assign": ["benibenj"]},
256257
"tree-views": {"assign": ["alexr00"]},
257258
"tree-widget": {"assign": ["joaomoreno"]},
258259
"typehierarchy": {"assign": ["jrieken"]},
@@ -272,6 +273,7 @@
272273
"webview": {"assign": ["mjbvz"]},
273274
"webview-views": {"assign": ["mjbvz"]},
274275
"workbench-actions": {"assign": ["bpasero"]},
276+
"workbench-auxwindow": {"assign": ["bpasero"]},
275277
"workbench-banner": {"assign": ["lszomoru", "sbatten"]},
276278
"workbench-cli": {"assign": ["bpasero"]},
277279
"workbench-diagnostics": {"assign": ["Tyriar"]},

.github/workflows/basic.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
sudo update-rc.d xvfb defaults
3030
sudo service xvfb start
3131
32-
- uses: actions/setup-node@v3
32+
- uses: actions/setup-node@v4
3333
with:
3434
node-version-file: .nvmrc
3535

@@ -38,7 +38,7 @@ jobs:
3838
run: echo "value=$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT
3939
- name: Cache node modules
4040
id: cacheNodeModules
41-
uses: actions/cache@v3
41+
uses: actions/cache@v4
4242
with:
4343
path: "**/node_modules"
4444
key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
@@ -48,7 +48,7 @@ jobs:
4848
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
4949
- name: Cache yarn directory
5050
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
51-
uses: actions/cache@v3
51+
uses: actions/cache@v4
5252
with:
5353
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
5454
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
@@ -61,7 +61,7 @@ jobs:
6161
run: yarn --frozen-lockfile --network-timeout 180000
6262

6363
- name: Compile and Download
64-
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64"
64+
run: yarn npm-run-all --max-old-space-size=4095 -lp compile "electron x64"
6565

6666
- name: Run Unit Tests
6767
id: electron-unit-tests
@@ -81,7 +81,7 @@ jobs:
8181
steps:
8282
- uses: actions/checkout@v4
8383

84-
- uses: actions/setup-node@v3
84+
- uses: actions/setup-node@v4
8585
with:
8686
node-version-file: .nvmrc
8787

@@ -90,7 +90,7 @@ jobs:
9090
run: echo "value=$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT
9191
- name: Cache node modules
9292
id: cacheNodeModules
93-
uses: actions/cache@v3
93+
uses: actions/cache@v4
9494
with:
9595
path: "**/node_modules"
9696
key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
@@ -100,7 +100,7 @@ jobs:
100100
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
101101
- name: Cache yarn directory
102102
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
103-
uses: actions/cache@v3
103+
uses: actions/cache@v4
104104
with:
105105
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
106106
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
@@ -143,7 +143,7 @@ jobs:
143143
steps:
144144
- uses: actions/checkout@v4
145145

146-
- uses: actions/setup-node@v3
146+
- uses: actions/setup-node@v4
147147
with:
148148
node-version-file: .nvmrc
149149

@@ -152,7 +152,7 @@ jobs:
152152
run: echo "value=$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT
153153
- name: Cache node modules
154154
id: cacheNodeModules
155-
uses: actions/cache@v3
155+
uses: actions/cache@v4
156156
with:
157157
path: "**/node_modules"
158158
key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
@@ -162,7 +162,7 @@ jobs:
162162
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
163163
- name: Cache yarn directory
164164
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
165-
uses: actions/cache@v3
165+
uses: actions/cache@v4
166166
with:
167167
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
168168
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}

0 commit comments

Comments
 (0)