Fix hygiene

This commit is contained in:
Alex Dima 2022-02-04 15:49:50 +01:00
parent 4f62f9b594
commit 0bf3071972
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
22 changed files with 179 additions and 174 deletions

View file

@ -1,4 +1,9 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.vscode-dark img[src$=\#gh-light-mode-only],
.vscode-light img[src$=\#gh-dark-mode-only] {
display: none;
display: none;
}

View file

@ -55,7 +55,7 @@ export function getHTMLMode(htmlLanguageService: HTMLLanguageService, workspace:
async getFoldingRanges(document: TextDocument): Promise<FoldingRange[]> {
return htmlLanguageService.getFoldingRanges(document);
},
async doAutoInsert(document: TextDocument, position: Position, kind: 'autoQuote' | 'autoClose', settings = workspace.settings) {
async doAutoInsert(document: TextDocument, position: Position, kind: 'autoQuote' | 'autoClose', settings = workspace.settings) {
const offset = document.offsetAt(position);
const text = document.getText();
if (kind === 'autoQuote') {

View file

@ -40,10 +40,10 @@
.monaco-progress-container.infinite.infinite-long-running .progress-bit {
/*
The more smooth `linear` timing function can cause
higher GPU consumption as indicated in
https://github.com/microsoft/vscode/issues/97900 &
https://github.com/microsoft/vscode/issues/138396
The more smooth `linear` timing function can cause
higher GPU consumption as indicated in
https://github.com/microsoft/vscode/issues/97900 &
https://github.com/microsoft/vscode/issues/138396
*/
animation-timing-function: steps(100);
}

View file

@ -39,12 +39,12 @@ export class Codicon implements CSSIcon {
public get cssSelector() { return '.codicon.codicon-' + this.id; }
// registry
private static _allCodicons : Codicon[] = [];
private static _allCodicons: Codicon[] = [];
/**
* @returns Returns all default icons covered by the codicon font. Only to be used by the icon registry in platform.
*/
public static getAll() : readonly Codicon[] {
public static getAll(): readonly Codicon[] {
return Codicon._allCodicons;
}

View file

@ -65,86 +65,86 @@ function doFindFreePort(startPort: number, giveUpAfter: number, stride: number,
// Reference: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc#56
export const BROWSER_RESTRICTED_PORTS: any = {
1: true, // tcpmux
7: true, // echo
9: true, // discard
11: true, // systat
13: true, // daytime
15: true, // netstat
17: true, // qotd
19: true, // chargen
20: true, // ftp data
21: true, // ftp access
22: true, // ssh
23: true, // telnet
25: true, // smtp
37: true, // time
42: true, // name
43: true, // nicname
53: true, // domain
69: true, // tftp
77: true, // priv-rjs
79: true, // finger
87: true, // ttylink
95: true, // supdup
101: true, // hostriame
102: true, // iso-tsap
103: true, // gppitnp
104: true, // acr-nema
109: true, // pop2
110: true, // pop3
111: true, // sunrpc
113: true, // auth
115: true, // sftp
117: true, // uucp-path
119: true, // nntp
123: true, // NTP
135: true, // loc-srv /epmap
137: true, // netbios
139: true, // netbios
143: true, // imap2
161: true, // snmp
179: true, // BGP
389: true, // ldap
427: true, // SLP (Also used by Apple Filing Protocol)
465: true, // smtp+ssl
512: true, // print / exec
513: true, // login
514: true, // shell
515: true, // printer
526: true, // tempo
530: true, // courier
531: true, // chat
532: true, // netnews
540: true, // uucp
548: true, // AFP (Apple Filing Protocol)
554: true, // rtsp
556: true, // remotefs
563: true, // nntp+ssl
587: true, // smtp (rfc6409)
601: true, // syslog-conn (rfc3195)
636: true, // ldap+ssl
989: true, // ftps-data
990: true, // ftps
993: true, // ldap+ssl
995: true, // pop3+ssl
1719: true, // h323gatestat
1720: true, // h323hostcall
1723: true, // pptp
2049: true, // nfs
3659: true, // apple-sasl / PasswordServer
4045: true, // lockd
5060: true, // sip
5061: true, // sips
6000: true, // X11
6566: true, // sane-port
6665: true, // Alternate IRC [Apple addition]
6666: true, // Alternate IRC [Apple addition]
6667: true, // Standard IRC [Apple addition]
6668: true, // Alternate IRC [Apple addition]
6669: true, // Alternate IRC [Apple addition]
6697: true, // IRC + TLS
10080: true // Amanda
1: true, // tcpmux
7: true, // echo
9: true, // discard
11: true, // systat
13: true, // daytime
15: true, // netstat
17: true, // qotd
19: true, // chargen
20: true, // ftp data
21: true, // ftp access
22: true, // ssh
23: true, // telnet
25: true, // smtp
37: true, // time
42: true, // name
43: true, // nicname
53: true, // domain
69: true, // tftp
77: true, // priv-rjs
79: true, // finger
87: true, // ttylink
95: true, // supdup
101: true, // hostriame
102: true, // iso-tsap
103: true, // gppitnp
104: true, // acr-nema
109: true, // pop2
110: true, // pop3
111: true, // sunrpc
113: true, // auth
115: true, // sftp
117: true, // uucp-path
119: true, // nntp
123: true, // NTP
135: true, // loc-srv /epmap
137: true, // netbios
139: true, // netbios
143: true, // imap2
161: true, // snmp
179: true, // BGP
389: true, // ldap
427: true, // SLP (Also used by Apple Filing Protocol)
465: true, // smtp+ssl
512: true, // print / exec
513: true, // login
514: true, // shell
515: true, // printer
526: true, // tempo
530: true, // courier
531: true, // chat
532: true, // netnews
540: true, // uucp
548: true, // AFP (Apple Filing Protocol)
554: true, // rtsp
556: true, // remotefs
563: true, // nntp+ssl
587: true, // smtp (rfc6409)
601: true, // syslog-conn (rfc3195)
636: true, // ldap+ssl
989: true, // ftps-data
990: true, // ftps
993: true, // ldap+ssl
995: true, // pop3+ssl
1719: true, // h323gatestat
1720: true, // h323hostcall
1723: true, // pptp
2049: true, // nfs
3659: true, // apple-sasl / PasswordServer
4045: true, // lockd
5060: true, // sip
5061: true, // sips
6000: true, // X11
6566: true, // sane-port
6665: true, // Alternate IRC [Apple addition]
6666: true, // Alternate IRC [Apple addition]
6667: true, // Standard IRC [Apple addition]
6668: true, // Alternate IRC [Apple addition]
6669: true, // Alternate IRC [Apple addition]
6697: true, // IRC + TLS
10080: true // Amanda
};
/**

View file

@ -191,7 +191,7 @@ export class ExtensionManagementCLIService implements IExtensionManagementCLISer
private async getGalleryExtensions(extensions: InstallExtensionInfo[]): Promise<Map<string, IGalleryExtension>> {
const galleryExtensions = new Map<string, IGalleryExtension>();
const preRelease = extensions.some(e => e.installOptions.installPreReleaseVersion);
const result = await this.extensionGalleryService.getExtensions(extensions.map(e => ({...e, preRelease})), CancellationToken.None);
const result = await this.extensionGalleryService.getExtensions(extensions.map(e => ({ ...e, preRelease })), CancellationToken.None);
for (const extension of result) {
galleryExtensions.set(extension.identifier.id.toLowerCase(), extension);
}

View file

@ -66,7 +66,7 @@ export class NativeStorageService extends AbstractStorageService {
}
protected async doInitialize(): Promise<void> {
// Init all storage locations
await Promises.settled([
this.globalStorage.init(),

View file

@ -52,19 +52,19 @@ export class WorkspacesMainService implements AddFirstParameterToFunctions<IWork
readonly onDidChangeRecentlyOpened = this.workspacesHistoryMainService.onDidChangeRecentlyOpened;
getRecentlyOpened(windowId: number): Promise<IRecentlyOpened> {
getRecentlyOpened(windowId: number): Promise<IRecentlyOpened> {
return this.workspacesHistoryMainService.getRecentlyOpened(this.windowsMainService.getWindowById(windowId));
}
addRecentlyOpened(windowId: number, recents: IRecent[]): Promise<void> {
addRecentlyOpened(windowId: number, recents: IRecent[]): Promise<void> {
return this.workspacesHistoryMainService.addRecentlyOpened(recents);
}
removeRecentlyOpened(windowId: number, paths: URI[]): Promise<void> {
removeRecentlyOpened(windowId: number, paths: URI[]): Promise<void> {
return this.workspacesHistoryMainService.removeRecentlyOpened(paths);
}
clearRecentlyOpened(windowId: number): Promise<void> {
clearRecentlyOpened(windowId: number): Promise<void> {
return this.workspacesHistoryMainService.clearRecentlyOpened();
}

View file

@ -124,7 +124,7 @@ export class MainThreadNotebookKernels implements MainThreadNotebookKernelsShape
this._disposables.add(toDisposable(() => {
// EH shut down, complete all executions started by this EH
this._executions.forEach(e => {
e.complete({ });
e.complete({});
});
}));

View file

@ -175,7 +175,7 @@ class TreeViewDragAndDropController implements ITreeViewDragAndDropController {
private readonly _proxy: ExtHostTreeViewsShape) { }
async handleDrop(dataTransfer: ITreeDataTransfer, targetTreeItem: ITreeItem, token: CancellationToken,
operationUuid?: string, sourceTreeId?: string, sourceTreeItemHandles?: string[]): Promise<void> {
operationUuid?: string, sourceTreeId?: string, sourceTreeItemHandles?: string[]): Promise<void> {
return this._proxy.$handleDrop(this.treeViewId, await TreeDataTransferConverter.toTreeDataTransferDTO(dataTransfer), targetTreeItem.handle, token, operationUuid, sourceTreeId, sourceTreeItemHandles);
}

View file

@ -30,8 +30,8 @@ declare namespace self {
let addEventListener: any;
let removeEventListener: any;
let dispatchEvent: any;
let indexedDB: { open: any; [k: string]: any };
let caches: { open: any; [k: string]: any };
let indexedDB: { open: any;[k: string]: any };
let caches: { open: any;[k: string]: any };
let importScripts: any;
let fetch: _Fetch;
let XMLHttpRequest: any;

View file

@ -165,7 +165,7 @@ export async function extractTreeDropData(dataTransfer: ITreeDataTransfer): Prom
// Invalid transfer
}
}
return editors;
}

View file

@ -532,7 +532,7 @@ class ResourceLabelWidget extends IconLabel {
(!this.options?.title)
|| ((typeof this.options.title !== 'string') && !this.options.title.markdownNotSupportedFallback)
)) {
if (!this.computedPathLabel) {
this.computedPathLabel = this.labelService.getUriLabel(resource);
}

View file

@ -42,7 +42,7 @@ export class DynamicEditorGroupAutoLockConfiguration extends Disposable implemen
// (atleast 20 times) while the extensions are getting registered.
// As such push out the dynamic editor auto lock configuration
// until after extensions registered.
(async ()=> {
(async () => {
await extensionService.whenInstalledExtensionsRegistered();
this.updateConfiguration();

View file

@ -11,7 +11,7 @@ import { INotificationsModel, INotificationChangeEvent, NotificationChangeType,
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
import { Emitter } from 'vs/base/common/event';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { INotificationsCenterController } from 'vs/workbench/browser/parts/notifications/notificationsCommands';
import { INotificationsCenterController } from 'vs/workbench/browser/parts/notifications/notificationsCommands';
import { NotificationsList } from 'vs/workbench/browser/parts/notifications/notificationsList';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { isAncestor, Dimension } from 'vs/base/browser/dom';

View file

@ -257,9 +257,9 @@ function convertPaths(msg: DebugProtocol.ProtocolMessage, fixSourcePath: (toDA:
case 'setBreakpoints':
(<DebugProtocol.SetBreakpointsResponse>response).body.breakpoints.forEach(bp => fixSourcePath(false, bp.source));
break;
case 'disassemble':
case 'disassemble':
{
const di = <DebugProtocol.DisassembleResponse> response;
const di = <DebugProtocol.DisassembleResponse>response;
if (di.body) {
di.body.instructions.forEach(di => fixSourcePath(false, di.location));
}

View file

@ -130,12 +130,12 @@
.monaco-workbench .simple-fr-find-part-wrapper .find-filter-button {
color: inherit;
margin-left: 2px;
float: left;
cursor: pointer;
box-sizing: border-box;
user-select: none;
-webkit-user-select: none;
margin-left: 2px;
float: left;
cursor: pointer;
box-sizing: border-box;
user-select: none;
-webkit-user-select: none;
}
.find-filter-button .monaco-action-bar .action-label {

View file

@ -1,79 +1,79 @@
if [ -z "$VSCODE_SHELL_LOGIN" ]; then
. ~/.bashrc
. ~/.bashrc
else
# Imitate -l because --init-file doesn't support it:
# run the first of these files that exists
if [ -f ~/.bash_profile ]; then
. ~/.bash_profile
elif [ -f ~/.bash_login ]; then
. ~/.bash_login
elif [ -f ~/.profile ]; then
. ~/.profile
fi
VSCODE_SHELL_LOGIN=""
# Imitate -l because --init-file doesn't support it:
# run the first of these files that exists
if [ -f ~/.bash_profile ]; then
. ~/.bash_profile
elif [ -f ~/.bash_login ]; then
. ~/.bash_login
elif [ -f ~/.profile ]; then
. ~/.profile
fi
VSCODE_SHELL_LOGIN=""
fi
IN_COMMAND_EXECUTION="1"
prompt_start() {
printf "\033]133;A\007"
printf "\033]133;A\007"
}
prompt_end() {
printf "\033]133;B\007"
printf "\033]133;B\007"
}
update_cwd() {
printf "\033]1337;CurrentDir=%s\007" "$PWD"
printf "\033]1337;CurrentDir=%s\007" "$PWD"
}
command_output_start() {
printf "\033]133;C\007"
printf "\033]133;C\007"
}
command_complete() {
printf "\033]133;D;%s\007" "$STATUS"
update_cwd
printf "\033]133;D;%s\007" "$STATUS"
update_cwd
}
update_prompt() {
PRIOR_PROMPT="$PS1"
IN_COMMAND_EXECUTION=""
PS1="$(prompt_start)$PREFIX$PS1$(prompt_end)"
PRIOR_PROMPT="$PS1"
IN_COMMAND_EXECUTION=""
PS1="$(prompt_start)$PREFIX$PS1$(prompt_end)"
}
precmd() {
local STATUS="$?"
command_complete "$STATUS"
local STATUS="$?"
command_complete "$STATUS"
# in command execution
if [ -n "$IN_COMMAND_EXECUTION" ]; then
# non null
update_prompt
fi
# in command execution
if [ -n "$IN_COMMAND_EXECUTION" ]; then
# non null
update_prompt
fi
}
preexec() {
PS1="$PRIOR_PROMPT"
if [ -z "${IN_COMMAND_EXECUTION-}" ]; then
IN_COMMAND_EXECUTION="1"
command_output_start
fi
PS1="$PRIOR_PROMPT"
if [ -z "${IN_COMMAND_EXECUTION-}" ]; then
IN_COMMAND_EXECUTION="1"
command_output_start
fi
}
update_prompt
export ORIGINAL_PROMPT_COMMAND=$PROMPT_COMMAND
prompt_cmd() {
precmd
precmd
}
original_prompt_cmd() {
${ORIGINAL_PROMPT_COMMAND}
prompt_cmd
${ORIGINAL_PROMPT_COMMAND}
prompt_cmd
}
if [ -n "$ORIGINAL_PROMPT_COMMAND" ]; then
export PROMPT_COMMAND=original_prompt_cmd
export PROMPT_COMMAND=original_prompt_cmd
else
export PROMPT_COMMAND=prompt_cmd
export PROMPT_COMMAND=prompt_cmd
fi
trap 'preexec' DEBUG

View file

@ -1,51 +1,51 @@
IN_COMMAND_EXECUTION="1"
prompt_start() {
printf "\033]133;A\007"
printf "\033]133;A\007"
}
prompt_end() {
printf "\033]133;B\007"
printf "\033]133;B\007"
}
update_cwd() {
printf "\033]1337;CurrentDir=%s\007" "$PWD"
printf "\033]1337;CurrentDir=%s\007" "$PWD"
}
command_output_start() {
printf "\033]133;C\007"
printf "\033]133;C\007"
}
command_complete() {
printf "\033]133;D;%s\007" "$STATUS"
update_cwd
printf "\033]133;D;%s\007" "$STATUS"
update_cwd
}
update_prompt() {
PRIOR_PROMPT="$PS1"
IN_COMMAND_EXECUTION=""
PS1="$(prompt_start)$PREFIX$PS1$(prompt_end)"
PRIOR_PROMPT="$PS1"
IN_COMMAND_EXECUTION=""
PS1="$(prompt_start)$PREFIX$PS1$(prompt_end)"
}
precmd() {
local STATUS="$?"
if [ -z "${IN_COMMAND_EXECUTION-}" ]; then
# not in command execution
command_output_start
fi
local STATUS="$?"
if [ -z "${IN_COMMAND_EXECUTION-}" ]; then
# not in command execution
command_output_start
fi
command_complete "$STATUS"
command_complete "$STATUS"
# in command execution
if [ -n "$IN_COMMAND_EXECUTION" ]; then
# non null
update_prompt
fi
# in command execution
if [ -n "$IN_COMMAND_EXECUTION" ]; then
# non null
update_prompt
fi
}
preexec() {
PS1="$PRIOR_PROMPT"
IN_COMMAND_EXECUTION="1"
command_output_start
PS1="$PRIOR_PROMPT"
IN_COMMAND_EXECUTION="1"
command_output_start
}
precmd_functions+=($precmd_functions precmd)
preexec_functions+=($preexec_functions preexec)

View file

@ -767,8 +767,8 @@ class TestingOutputPeek extends PeekViewWidget {
}
protected override _relayout(newHeightInLines: number): void {
super._relayout(newHeightInLines);
TestingOutputPeek.lastHeightInLines = newHeightInLines;
super._relayout(newHeightInLines);
TestingOutputPeek.lastHeightInLines = newHeightInLines;
}
/** @override */

View file

@ -279,7 +279,7 @@ export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvi
extensionHostDebugEnvironment.extensionDevelopmentLocationURI = developmentOptions.extensions.map(e => URI.revive(e));
extensionHostDebugEnvironment.isExtensionDevelopment = true;
}
if (developmentOptions.extensionTestsPath) {
extensionHostDebugEnvironment.extensionTestsLocationURI = URI.revive(developmentOptions.extensionTestsPath);
}

View file

@ -320,7 +320,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService {
return resolvedKeybinding.getDispatchParts().map(x => x || '[null]').join(' ');
}
private _printResolvedKeybindings(output:string[], input: string, resolvedKeybindings: ResolvedKeybinding[]): void {
private _printResolvedKeybindings(output: string[], input: string, resolvedKeybindings: ResolvedKeybinding[]): void {
const padLength = 35;
const firstRow = `${input.padStart(padLength, ' ')} => `;
if (resolvedKeybindings.length === 0) {