diff --git a/extensions/merge-conflict/src/documentMergeConflict.ts b/extensions/merge-conflict/src/documentMergeConflict.ts index 560c7ed8c72823cc5d05addfb78a59711a7a3afa..d3d421f22d12a1f17efe06d8e0a74273e098e714 100644 --- a/extensions/merge-conflict/src/documentMergeConflict.ts +++ b/extensions/merge-conflict/src/documentMergeConflict.ts @@ -35,7 +35,7 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict public applyEdit(type: interfaces.CommitType, document: vscode.TextDocument, edit: { replace(range: vscode.Range, newText: string): void; }): void { // Each conflict is a set of ranges as follows, note placements or newlines - // which may not in in spans + // which may not in spans // [ Conflict Range -- (Entire content below) // [ Current Header ]\n -- >>>>> Header // [ Current Content ] -- (content) @@ -75,4 +75,4 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict private isNewlineOnly(text: string) { return text === '\n' || text === '\r\n'; } -} \ No newline at end of file +} diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts index f7216dfdb10730170d5a82630b05ce9112e80ac6..c61cf6267c165dbef68ee27efcbc846ab4b8b50c 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts @@ -64,7 +64,7 @@ export class MouseWheelClassifier { return false; } - // 0.5 * last + 0.25 * before last + 0.125 * before before last + ... + // 0.5 * last + 0.25 * 2nd last + 0.125 * 3rd last + ... let remainingInfluence = 1; let score = 0; let iteration = 1; diff --git a/src/vs/base/parts/ipc/node/ipc.net.ts b/src/vs/base/parts/ipc/node/ipc.net.ts index 11e4f516f22449b529f6b106fc23b738cd7b4a97..ec80ba3f1c3a6dff864e7b39a4bd732bed55ee50 100644 --- a/src/vs/base/parts/ipc/node/ipc.net.ts +++ b/src/vs/base/parts/ipc/node/ipc.net.ts @@ -56,7 +56,7 @@ export class NodeSocket implements ISocket { // anyways and nodejs is already doing that for us: // > https://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback // > However, the false return value is only advisory and the writable stream will unconditionally - // > accept and buffer chunk even if it has not not been allowed to drain. + // > accept and buffer chunk even if it has not been allowed to drain. this.socket.write(buffer.buffer); } diff --git a/src/vs/editor/browser/viewParts/selections/selections.ts b/src/vs/editor/browser/viewParts/selections/selections.ts index fa2dd7220331b248fa36947cb39563c2b8b4e29a..d50b0f5679b3f0af4e3b05101425fe58ffb1d66c 100644 --- a/src/vs/editor/browser/viewParts/selections/selections.ts +++ b/src/vs/editor/browser/viewParts/selections/selections.ts @@ -369,7 +369,7 @@ export class SelectionsOverlay extends DynamicViewOverlay { private _previousFrameVisibleRangesWithStyle: (LineVisibleRangesWithStyle[] | null)[] = []; public prepareRender(ctx: RenderingContext): void { - // Build HTML for inner corners separate from HTML for the the rest of selections, + // Build HTML for inner corners separate from HTML for the rest of selections, // as the inner corner HTML can interfere with that of other selections. // In final render, make sure to place the inner corner HTML before the rest of selection HTML. See issue #77777. const output: [string, string][] = []; diff --git a/src/vs/editor/contrib/find/test/find.test.ts b/src/vs/editor/contrib/find/test/find.test.ts index 1cfc4f135f09ffaebb4b2b8c0b0f1f5e9daa5ee9..a0e8e987ef3d0f0adf9420196354203a5fe10ba2 100644 --- a/src/vs/editor/contrib/find/test/find.test.ts +++ b/src/vs/editor/contrib/find/test/find.test.ts @@ -75,7 +75,7 @@ suite('Find', () => { let searchStringSelectionTwoLines = getSelectionSearchString(editor); assert.equal(searchStringSelectionTwoLines, null); - // Select end of first line newline and and chunk of second + // Select end of first line newline and chunk of second editor.setSelection(new Range(1, 7, 2, 4)); let searchStringSelectionSpanLines = getSelectionSearchString(editor); assert.equal(searchStringSelectionSpanLines, null); diff --git a/src/vs/editor/contrib/gotoSymbol/goToCommands.ts b/src/vs/editor/contrib/gotoSymbol/goToCommands.ts index cdcad1d5df4c9e894f67e0886cf8d59ce2c1c9e1..991f29f19c8b7fa3c7e0b68ddb54fc17f53000b6 100644 --- a/src/vs/editor/contrib/gotoSymbol/goToCommands.ts +++ b/src/vs/editor/contrib/gotoSymbol/goToCommands.ts @@ -152,7 +152,7 @@ abstract class SymbolNavigationAction extends EditorAction { private async _openReference(editor: ICodeEditor, editorService: ICodeEditorService, reference: Location | LocationLink, sideBySide: boolean, highlight: boolean): Promise { // range is the target-selection-range when we have one - // and the the fallback is the 'full' range + // and the fallback is the 'full' range let range: IRange | undefined = undefined; if (isLocationLink(reference)) { range = reference.targetSelectionRange; diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 555187ec1d072e1f1b20d0cb5c80b3cd57bc1be6..3c8c3c4a8666bf769dd39935e3abedfff0637435 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4925,7 +4925,7 @@ declare module 'vscode' { * The extension kind describes if an extension runs where the UI runs * or if an extension runs where the remote extension host runs. The extension kind * is defined in the `package.json`-file of extensions but can also be refined - * via the the `remote.extensionKind`-setting. When no remote extension host exists, + * via the `remote.extensionKind`-setting. When no remote extension host exists, * the value is [`ExtensionKind.UI`](#ExtensionKind.UI). */ extensionKind: ExtensionKind; diff --git a/src/vs/workbench/contrib/customEditor/browser/webviewEditor.contribution.ts b/src/vs/workbench/contrib/customEditor/browser/webviewEditor.contribution.ts index cdb3dc55fc987309f8803b0477aa5bf379c069e1..663521b2042bf48eb31b372b84039a0be908937b 100644 --- a/src/vs/workbench/contrib/customEditor/browser/webviewEditor.contribution.ts +++ b/src/vs/workbench/contrib/customEditor/browser/webviewEditor.contribution.ts @@ -58,7 +58,7 @@ Registry.as(ConfigurationExtensions.Configuration) }, 'filenamePattern': { type: 'string', - description: nls.localize('editor.editorAssociations.filenamePattern', "Glob pattern the the editor should be used for."), + description: nls.localize('editor.editorAssociations.filenamePattern', "Glob pattern the editor should be used for."), } } } diff --git a/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts b/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts index 2f72c3ab5a1f77aea7755216da347beb7009bdb1..a8469d9418512a870b5da5eff7b413f51e0b7752 100644 --- a/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts +++ b/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts @@ -553,7 +553,7 @@ export class SimpleFileDialog { } else if (this.endsWithSlash(value)) { // The input box contains a path that doesn't exist on the system. this.filePickBox.validationMessage = nls.localize('remoteFileDialog.badPath', 'The path does not exist.'); - // Save this bad path. It can take too long to to a stat on every user entered character, but once a user enters a bad path they are likely + // Save this bad path. It can take too long to a stat on every user entered character, but once a user enters a bad path they are likely // to keep typing more bad path. We can compare against this bad path and see if the user entered path starts with it. this.badPath = value; return UpdateResult.InvalidPath; diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts index 08ebc5edc4d010c1829915a3eb27994fead65040..13ff5e0fa7738e03c6cbf5978fb011a1e7edca23 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts @@ -282,15 +282,15 @@ export class TextFileEditorModelManager extends Disposable implements ITextFileE this.mapResourceToModel.clear(); this.mapResourceToPendingModelLoaders.clear(); - // dispose dispose listeners + // dispose the dispose listeners this.mapResourceToDisposeListener.forEach(l => l.dispose()); this.mapResourceToDisposeListener.clear(); - // dispose state change listeners + // dispose the state change listeners this.mapResourceToStateChangeListener.forEach(l => l.dispose()); this.mapResourceToStateChangeListener.clear(); - // dispose model content change listeners + // dispose the model content change listeners this.mapResourceToModelContentChangeListener.forEach(l => l.dispose()); this.mapResourceToModelContentChangeListener.clear(); } diff --git a/test/smoke/README.md b/test/smoke/README.md index 56bddbd89b8cbacf03184f6eb5115e453b021b97..7fc0ced719ff571671af3e1f9af33736da6cd8fe 100644 --- a/test/smoke/README.md +++ b/test/smoke/README.md @@ -56,6 +56,6 @@ yarn watch - Beware of **focus**. **Never** depend on DOM elements having focus using `.focused` classes or `:focus` pseudo-classes, since they will lose that state as soon as another window appears on top of the running VS Code window. A safe approach which avoids this problem is to use the `waitForActiveElement` API. Many tests use this whenever they need to wait for a specific element to _have focus_. -- Beware of **timing**. You need to read from or write to the DOM... but is it the right time to do that? Can you 100% guarantee that that `input` box will be visible at that point in time? Or are you just hoping that it will be so? Hope is your worst enemy in UI tests. Example: just because you triggered Quick Open with `F1`, it doesn't mean that it's open and you can just start typing; you must first wait for the input element to be in the DOM as well as be the current active element. +- Beware of **timing**. You need to read from or write to the DOM... but is it the right time to do that? Can you 100% guarantee that `input` box will be visible at that point in time? Or are you just hoping that it will be so? Hope is your worst enemy in UI tests. Example: just because you triggered Quick Open with `F1`, it doesn't mean that it's open and you can just start typing; you must first wait for the input element to be in the DOM as well as be the current active element. - Beware of **waiting**. **Never** wait longer than a couple of seconds for anything, unless it's justified. Think of it as a human using Code. Would a human take 10 minutes to run through the Search viewlet smoke test? Then, the computer should even be faster. **Don't** use `setTimeout` just because. Think about what you should wait for in the DOM to be ready and wait for that instead.