diff --git a/.editorconfig b/.editorconfig index 986aba03a6..84e1b49326 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,4 +2,9 @@ root = true [*] charset = utf-8 +indent_style = space +indent_size = 4 insert_final_newline = true + +[*.{json,yaml,yml}] +indent_size = 2 diff --git a/.poshchan/settings.json b/.poshchan/settings.json index 7665d98673..383cedb7b0 100644 --- a/.poshchan/settings.json +++ b/.poshchan/settings.json @@ -1,42 +1,42 @@ { - "version": "0.1", - "azdevops": { - "build_targets": { - "ci": "vscode-powershell-ci" - }, - "authorized_users": [ - "adityapatwardhan", - "anmenaga", - "bergmeister", - "daxian-dbw", - "JamesWTruher", - "PaulHigin", - "rjmholt", - "rkeithhill", - "SeeminglyScience", - "SteveL-MSFT", - "TravisEz13", - "TylerLeonhardt" - ] + "version": "0.1", + "azdevops": { + "build_targets": { + "ci": "vscode-powershell-ci" }, - "failures": { - "authorized_users": [ - "adityapatwardhan", - "anmenaga", - "bergmeister", - "daxian-dbw", - "glennsarti", - "JamesWTruher", - "PaulHigin", - "rjmholt", - "rkeithhill", - "SeeminglyScience", - "SteveL-MSFT", - "TravisEz13", - "TylerLeonhardt" - ] - }, - "reminders": { - "authorized_users": "*" - } -} + "authorized_users": [ + "adityapatwardhan", + "anmenaga", + "bergmeister", + "daxian-dbw", + "JamesWTruher", + "PaulHigin", + "rjmholt", + "rkeithhill", + "SeeminglyScience", + "SteveL-MSFT", + "TravisEz13", + "TylerLeonhardt" + ] + }, + "failures": { + "authorized_users": [ + "adityapatwardhan", + "anmenaga", + "bergmeister", + "daxian-dbw", + "glennsarti", + "JamesWTruher", + "PaulHigin", + "rjmholt", + "rkeithhill", + "SeeminglyScience", + "SteveL-MSFT", + "TravisEz13", + "TylerLeonhardt" + ] + }, + "reminders": { + "authorized_users": "*" + } +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 2e8ab9f8a0..a5cedb6ca6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,42 +1,53 @@ { - "version": "0.1.0", - "configurations": [ - { - "name": "Launch Extension", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ "--extensionDevelopmentPath=${workspaceRoot}" ], - "stopOnEntry": false, - "sourceMaps": true, - "outFiles": ["${workspaceFolder}/out/src/**/*.js"], - "preLaunchTask": "BuildAll" - }, - { - "name": "Launch Extension (Build client only)", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ "--extensionDevelopmentPath=${workspaceFolder}" ], - "stopOnEntry": false, - "sourceMaps": true, - "outFiles": ["${workspaceFolder}/out/src/**/*.js"], - "preLaunchTask": "Build" - }, - { - "name": "Launch Extension Tests", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "--disable-extensions", - "--enable-proposed-api", "ms-vscode.powershell-preview", - "--extensionDevelopmentPath=${workspaceFolder}", - "--extensionTestsPath=${workspaceFolder}/out/test/testRunner.js", - "${workspaceFolder}/test" - ], - "outFiles": ["${workspaceFolder}/out/**/*.js"], - "preLaunchTask": "Build" - } - ] + "version": "0.1.0", + "configurations": [ + { + "name": "Launch Extension", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--extensionDevelopmentPath=${workspaceRoot}" + ], + "stopOnEntry": false, + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder}/out/src/**/*.js" + ], + "preLaunchTask": "BuildAll" + }, + { + "name": "Launch Extension (Build client only)", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}" + ], + "stopOnEntry": false, + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder}/out/src/**/*.js" + ], + "preLaunchTask": "Build" + }, + { + "name": "Launch Extension Tests", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--disable-extensions", + "--enable-proposed-api", + "ms-vscode.powershell-preview", + "--extensionDevelopmentPath=${workspaceFolder}", + "--extensionTestsPath=${workspaceFolder}/out/test/testRunner.js", + "${workspaceFolder}/test" + ], + "outFiles": [ + "${workspaceFolder}/out/**/*.js" + ], + "preLaunchTask": "Build" + } + ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index c26f0f0079..d0e0a1929b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,28 +1,26 @@ // Place your settings in this file to overwrite default and user settings. { - "editor.tabSize": 4, - "editor.insertSpaces": true, - "files.trimTrailingWhitespace": true, - // Add a visual ruler for the typescript linting line length - "editor.rulers": [120], - - "files.associations": { - // Use JSONC instead of JSON because (1) that's how VS Code interprets snippet files, and (2) it enables better source documentation. - "**/snippets/*.json": "jsonc" - }, - - "search.exclude": { - "**/node_modules": true, - "**/bower_components": true, - "logs/": true, - "out/": true - }, - - // Lock the TypeScript SDK path to the version we use - "typescript.tsdk": "./node_modules/typescript/lib", - - // Ignore the MD rule: - "markdownlint.config": { - "MD024": false // no-duplicate-header - } + "editor.tabSize": 4, + "editor.insertSpaces": true, + "files.trimTrailingWhitespace": true, + // Add a visual ruler for the typescript linting line length + "editor.rulers": [ + 120 + ], + "files.associations": { + // Use JSONC instead of JSON because (1) that's how VS Code interprets snippet files, and (2) it enables better source documentation. + "**/snippets/*.json": "jsonc" + }, + "search.exclude": { + "**/node_modules": true, + "**/bower_components": true, + "logs/": true, + "out/": true + }, + // Lock the TypeScript SDK path to the version we use + "typescript.tsdk": "./node_modules/typescript/lib", + // Ignore the MD rule: + "markdownlint.config": { + "MD024": false // no-duplicate-header + } } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index c4f6a47392..16dc6000d5 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,76 +1,85 @@ { - "version": "2.0.0", - - "windows": { - "options": { - "shell": { - "executable": "pwsh.exe", - "args": [ "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command" ] - } - } + "version": "2.0.0", + "windows": { + "options": { + "shell": { + "executable": "pwsh.exe", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-Command" + ] + } + } + }, + "linux": { + "options": { + "shell": { + "executable": "pwsh", + "args": [ + "-NoProfile", + "-Command" + ] + } + } + }, + "osx": { + "options": { + "shell": { + "executable": "/usr/local/bin/pwsh", + "args": [ + "-NoProfile", + "-Command" + ] + } + } + }, + "tasks": [ + { + "label": "Install", + "type": "shell", + "command": "Invoke-Build Restore", + "problemMatcher": [] }, - "linux": { - "options": { - "shell": { - "executable": "pwsh", - "args": [ "-NoProfile", "-Command" ] - } - } + { + "label": "CleanAll", + "type": "shell", + "command": "Invoke-Build CleanAll", + "problemMatcher": [] }, - "osx": { - "options": { - "shell": { - "executable": "/usr/local/bin/pwsh", - "args": [ "-NoProfile", "-Command" ] - } - } + { + "label": "Clean", + "type": "shell", + "command": "Invoke-Build Clean", + "problemMatcher": [] }, - - "tasks": [ - { - "label": "Install", - "type": "shell", - "command": "Invoke-Build Restore", - "problemMatcher": [] - }, - { - "label": "CleanAll", - "type": "shell", - "command": "Invoke-Build CleanAll", - "problemMatcher": [] - }, - { - "label": "Clean", - "type": "shell", - "command": "Invoke-Build Clean", - "problemMatcher": [] - }, - { - "label": "BuildAll", - "type": "shell", - "command": "Invoke-Build BuildAll", - "group": { - "kind": "build", - "isDefault": true - }, - "problemMatcher": [] - }, - { - "label": "Build", - "type": "shell", - "command": "Invoke-Build Build", - "group": "build", - "problemMatcher": [] - }, - { - "label": "Test", - "type": "shell", - "command": "Invoke-Build Test", - "group": { - "kind": "test", - "isDefault": true - }, - "problemMatcher": [] - } - ] + { + "label": "BuildAll", + "type": "shell", + "command": "Invoke-Build BuildAll", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "label": "Build", + "type": "shell", + "command": "Invoke-Build Build", + "group": "build", + "problemMatcher": [] + }, + { + "label": "Test", + "type": "shell", + "command": "Invoke-Build Test", + "group": { + "kind": "test", + "isDefault": true + }, + "problemMatcher": [] + } + ] } diff --git a/src/debugAdapter.ts b/src/debugAdapter.ts index 0012a4a290..26e6e8b845 100644 --- a/src/debugAdapter.ts +++ b/src/debugAdapter.ts @@ -8,7 +8,7 @@ import { Logger } from "./logging"; export class NamedPipeDebugAdapter implements DebugAdapter { private static readonly TWO_CRLF = '\r\n\r\n'; - private static readonly HEADER_LINESEPARATOR = /\r?\n/; // allow for non-RFC 2822 conforming line separators + private static readonly HEADER_LINESEPARATOR = /\r?\n/; // allow for non-RFC 2822 conforming line separators private static readonly HEADER_FIELDSEPARATOR = /: */; private readonly _logger: Logger; diff --git a/src/features/DebugSession.ts b/src/features/DebugSession.ts index d5b988e375..8a027379f7 100644 --- a/src/features/DebugSession.ts +++ b/src/features/DebugSession.ts @@ -372,7 +372,7 @@ export class SpecifyScriptArgsFeature implements vscode.Disposable { } interface IProcessItem extends vscode.QuickPickItem { - pid: string; // payload for the QuickPick UI + pid: string; // payload for the QuickPick UI } interface IPSHostProcessInfo { @@ -508,7 +508,7 @@ export class PickPSHostProcessFeature extends LanguageClientConsumer { } interface IRunspaceItem extends vscode.QuickPickItem { - id: string; // payload for the QuickPick UI + id: string; // payload for the QuickPick UI } interface IRunspace { diff --git a/test/testRunner.ts b/test/testRunner.ts index fec33426db..8469d647e0 100644 --- a/test/testRunner.ts +++ b/test/testRunner.ts @@ -9,7 +9,7 @@ import * as path from "path"; export function run(): Promise { // Create the mocha test const mocha = new Mocha({ - ui: "tdd", // the TDD UI is being used in extension.test.ts (suite, test, etc.) + ui: "tdd", // the TDD UI is being used in extension.test.ts (suite, test, etc.) useColors: !process.env.TF_BUILD, // colored output from test results reporter: "mocha-multi-reporters", timeout: 5000, diff --git a/themes/theme-psise/theme.json b/themes/theme-psise/theme.json index 609193979d..9395581ec7 100644 --- a/themes/theme-psise/theme.json +++ b/themes/theme-psise/theme.json @@ -1,209 +1,207 @@ { - "name": "PowerShell ISE", - "semanticHighlighting": true, - "tokenColors": [ - { - "settings": { - "background": "#FFFFFF", - "foreground": "#000000" - } - }, - { - "name": "Comments", - "scope": [ - "comment", - "punctuation.definition.comment" - ], - "settings": { - "fontStyle": "italic", - "foreground": "#006400" - } - }, - { - "name": "Comments: Preprocessor", - "scope": "comment.block.preprocessor", - "settings": { - "fontStyle": "", - "foreground": "#006400" - } - }, - { - "name": "Comments: Documentation", - "scope": [ - "comment.documentation", - "comment.block.documentation" - ], - "settings": { - "foreground": "#006400" - } - }, - { - "name": "Invalid - Deprecated", - "scope": "invalid.deprecated", - "settings": { - "background": "#96000014" - } - }, - { - "name": "Invalid - Illegal", - "scope": "invalid.illegal", - "settings": { - "background": "#96000014", - "foreground": "#660000" - } - }, - { - "name": "Operators", - "scope": "keyword.operator", - "settings": { - "foreground": "#A9A9A9" - } - }, - { - "name": "Keywords", - "scope": [ - "keyword", - "storage" - ], - "settings": { - "foreground": "#00008B" - } - }, - { - "name": "Types", - "scope": [ - "storage.type", - "support.type" - ], - "settings": { - "foreground": "#00008B" - } - }, - { - "name": "Language Constants", - "scope": [ - "constant.language", - "support.constant", - "variable.language" - ], - "settings": { - "foreground": "#008080" - } - }, - { - "name": "Keys and Properties", - "scope": [ - "property", - "variable.other.property", - "variable.other.property.powershell" - ], - "settings": { - "foreground": "#2d2e45" - } - }, - { - "name": "Variables", - "scope": [ - "variable", - "support.variable", - "punctuation.definition.variable.powershell", - "variable.other.readwrite.powershell" - ], - "settings": { - "foreground": "#FF4500" - } - }, - { - "name": "Functions", - "scope": [ - "entity.name.function", - "support.function" - ], - "settings": { - "foreground": "#0000FF" - } - }, - { - "name": "Classes", - "scope": [ - "entity.name.type", - "entity.other.inherited-class", - "support.class" - ], - "settings": { - "foreground": "#7A3E9D" - } - }, - { - "name": "Exceptions", - "scope": "entity.name.exception", - "settings": { - "foreground": "#660000" - } - }, - { - "name": "Sections", - "scope": "entity.name.section", - "settings": { - } - }, - { - "name": "Numbers, Characters", - "scope": [ - "constant.numeric", - "constant.character", - "constant" - ], - "settings": { - "foreground": "#800080" - } - }, - { - "name": "Strings", - "scope": "string", - "settings": { - "foreground": "#8B0000" - } - }, - { - "name": "Strings: Escape Sequences", - "scope": "constant.character.escape", - "settings": { - "foreground": "#8B0000" - } - }, - { - "name": "Strings: Regular Expressions", - "scope": "string.regexp", - "settings": { - "foreground": "#8B0000" - } - }, - { - "name": "Strings: Symbols", - "scope": "constant.other.symbol", - "settings": { - "foreground": "#8B0000" - } - }, - { - "name": "Punctuation", - "scope": "punctuation", - "settings": { - "foreground": "#000000" - } - } - ], - "colors": { - "activityBar.background": "#E1ECF9", - "activityBar.foreground": "#A9A9A9", - "activityBarBadge.background": "#A9A9A9", - "editor.lineHighlightBackground": "#add8e6", - "editor.selectionBackground": "#94c6f7", - "statusBar.background": "#999999", - "statusBar.debuggingBackground": "#FF4500", - "statusBar.noFolderBackground": "#999999", - "terminal.background": "#012456", - "terminal.foreground": "#F5F5F5" - } -} + "name": "PowerShell ISE", + "semanticHighlighting": true, + "tokenColors": [{ + "settings": { + "background": "#FFFFFF", + "foreground": "#000000" + } + }, + { + "name": "Comments", + "scope": [ + "comment", + "punctuation.definition.comment" + ], + "settings": { + "fontStyle": "italic", + "foreground": "#006400" + } + }, + { + "name": "Comments: Preprocessor", + "scope": "comment.block.preprocessor", + "settings": { + "fontStyle": "", + "foreground": "#006400" + } + }, + { + "name": "Comments: Documentation", + "scope": [ + "comment.documentation", + "comment.block.documentation" + ], + "settings": { + "foreground": "#006400" + } + }, + { + "name": "Invalid - Deprecated", + "scope": "invalid.deprecated", + "settings": { + "background": "#96000014" + } + }, + { + "name": "Invalid - Illegal", + "scope": "invalid.illegal", + "settings": { + "background": "#96000014", + "foreground": "#660000" + } + }, + { + "name": "Operators", + "scope": "keyword.operator", + "settings": { + "foreground": "#A9A9A9" + } + }, + { + "name": "Keywords", + "scope": [ + "keyword", + "storage" + ], + "settings": { + "foreground": "#00008B" + } + }, + { + "name": "Types", + "scope": [ + "storage.type", + "support.type" + ], + "settings": { + "foreground": "#00008B" + } + }, + { + "name": "Language Constants", + "scope": [ + "constant.language", + "support.constant", + "variable.language" + ], + "settings": { + "foreground": "#008080" + } + }, + { + "name": "Keys and Properties", + "scope": [ + "property", + "variable.other.property", + "variable.other.property.powershell" + ], + "settings": { + "foreground": "#2d2e45" + } + }, + { + "name": "Variables", + "scope": [ + "variable", + "support.variable", + "punctuation.definition.variable.powershell", + "variable.other.readwrite.powershell" + ], + "settings": { + "foreground": "#FF4500" + } + }, + { + "name": "Functions", + "scope": [ + "entity.name.function", + "support.function" + ], + "settings": { + "foreground": "#0000FF" + } + }, + { + "name": "Classes", + "scope": [ + "entity.name.type", + "entity.other.inherited-class", + "support.class" + ], + "settings": { + "foreground": "#7A3E9D" + } + }, + { + "name": "Exceptions", + "scope": "entity.name.exception", + "settings": { + "foreground": "#660000" + } + }, + { + "name": "Sections", + "scope": "entity.name.section", + "settings": {} + }, + { + "name": "Numbers, Characters", + "scope": [ + "constant.numeric", + "constant.character", + "constant" + ], + "settings": { + "foreground": "#800080" + } + }, + { + "name": "Strings", + "scope": "string", + "settings": { + "foreground": "#8B0000" + } + }, + { + "name": "Strings: Escape Sequences", + "scope": "constant.character.escape", + "settings": { + "foreground": "#8B0000" + } + }, + { + "name": "Strings: Regular Expressions", + "scope": "string.regexp", + "settings": { + "foreground": "#8B0000" + } + }, + { + "name": "Strings: Symbols", + "scope": "constant.other.symbol", + "settings": { + "foreground": "#8B0000" + } + }, + { + "name": "Punctuation", + "scope": "punctuation", + "settings": { + "foreground": "#000000" + } + } + ], + "colors": { + "activityBar.background": "#E1ECF9", + "activityBar.foreground": "#A9A9A9", + "activityBarBadge.background": "#A9A9A9", + "editor.lineHighlightBackground": "#add8e6", + "editor.selectionBackground": "#94c6f7", + "statusBar.background": "#999999", + "statusBar.debuggingBackground": "#FF4500", + "statusBar.noFolderBackground": "#999999", + "terminal.background": "#012456", + "terminal.foreground": "#F5F5F5" + } +} \ No newline at end of file