From 6115f8db82a1fdf1a1efd415426b950327288cb2 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Fri, 13 Nov 2020 11:45:08 -0600 Subject: [PATCH] Fix the spellbot (#8259) --- .../actions/spell-check/dictionary/apis.txt | 2 ++ .github/actions/spell-check/excludes.txt | 1 + .github/actions/spell-check/expect/expect.txt | 5 +++- .../Build-SupportedSequenceIndex.ps1 | 30 +++++++++---------- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/actions/spell-check/dictionary/apis.txt b/.github/actions/spell-check/dictionary/apis.txt index 4c94cd575..f61168603 100644 --- a/.github/actions/spell-check/dictionary/apis.txt +++ b/.github/actions/spell-check/dictionary/apis.txt @@ -4,6 +4,7 @@ alignof bitfield bitfields CLASSNOTAVAILABLE +cmdletbinding COLORPROPERTY CXICON CYICON @@ -53,6 +54,7 @@ roundf RSHIFT rx schandle +semver serializer SIZENS spsc diff --git a/.github/actions/spell-check/excludes.txt b/.github/actions/spell-check/excludes.txt index 165b5d6d5..8639b6b91 100644 --- a/.github/actions/spell-check/excludes.txt +++ b/.github/actions/spell-check/excludes.txt @@ -62,3 +62,4 @@ SUMS$ ^src/tools/U8U16Test/(?:fr|ru|zh)\.txt$ ^\.github/actions/spell-check/ ^\.gitignore$ +^doc/reference/master-sequence-list.csv$ diff --git a/.github/actions/spell-check/expect/expect.txt b/.github/actions/spell-check/expect/expect.txt index 1b53779d7..63f88247b 100644 --- a/.github/actions/spell-check/expect/expect.txt +++ b/.github/actions/spell-check/expect/expect.txt @@ -355,6 +355,7 @@ consoleapi CONSOLECONTROL CONSOLEENDTASK consolegit +consolehost CONSOLEIME consoleinternal Consoleroot @@ -636,6 +637,7 @@ dpiy DRAWFRAME DRAWITEM DRAWITEMSTRUCT +drcs dropdown DROPDOWNLIST DROPFILES @@ -2421,6 +2423,7 @@ ucdxml uch UCHAR ucs +UDK UDKs UDM uer @@ -2831,4 +2834,4 @@ AAAAA BBBBBCCC abcd LPMINMAXINFO -MINMAXINFO \ No newline at end of file +MINMAXINFO diff --git a/doc/reference/Build-SupportedSequenceIndex.ps1 b/doc/reference/Build-SupportedSequenceIndex.ps1 index 2ab846176..0cf12568a 100644 --- a/doc/reference/Build-SupportedSequenceIndex.ps1 +++ b/doc/reference/Build-SupportedSequenceIndex.ps1 @@ -2,13 +2,13 @@ <# .SYNOPSIS -Scan source code and build a list of supported VT sequences. +Scan source code and build a list of supported VT sequences. .DESCRIPTION -Scan source code and build a list of supported VT sequences. +Scan source code and build a list of supported VT sequences. TODO: add more details #> [cmdletbinding(DefaultParameterSetName="stdout")] -param( +param( [parameter(ParameterSetName="file", mandatory)] [string]$OutFile, [parameter(ParameterSetName="file")] @@ -34,7 +34,7 @@ param( [string]$ConsoleAdapterPath = $(join-path $solutionRoot "src\terminal\adapter\adaptDispatch.hpp"), [parameter(ParameterSetName="file")] [parameter(ParameterSetName="stdout")] - [string]$TerminalAdapterPath = $(join-path $solutionRoot "src\cascadia\terminalcore\terminaldispatch.hpp") + [string]$TerminalAdapterPath = $(join-path $solutionRoot "src\cascadia\terminalcore\terminalDispatch.hpp") ) if ($PSCmdlet.ParameterSetName -eq "stdout") { @@ -53,10 +53,10 @@ $terminal = @{} $prefix = "https://vt100.net/docs/vt510-rm/" $repo = "https://github.com/oising/terminal/tree/master" $conhostUrl = $ConsoleAdapterPath.TrimStart($SolutionRoot).replace("\", "/") -$terminalurl = $TerminalAdapterPath.TrimStart($SolutionRoot).replace("\", "/") +$terminalUrl = $TerminalAdapterPath.TrimStart($SolutionRoot).replace("\", "/") function Read-SourceFiles { - # extract base interface + # extract base interface $baseScanner = [regex]'(?x)virtual\s\w+\s(?\w+)(?s)[^;]+;(?-s).*?(?(?<=\/\/\s).+)' $baseScanner.Matches(($src = get-content -raw $interfacePath)) | foreach-object { @@ -74,7 +74,7 @@ function Read-SourceFiles { $scanner.Matches(($src = Get-Content -raw $consoleAdapterPath)) | ForEach-Object { $line = (($src[0..$_.Index] -join "") -split "`n").Length $SCRIPT:conhost[$_.groups["method"].value] = $line - } + } $scanner.Matches(($src = Get-Content -raw $terminalAdapterPath)) | ForEach-Object { $line = (($src[0..$_.Index] -join "") -split "`n").Length @@ -85,14 +85,14 @@ function Read-SourceFiles { function Get-SequenceIndexMarkdown { # "Sequence","Parent","Description","Origin","Heading","Subheading", "ImplementedBy", "ConsoleHost","Terminal" - + $heading = $null $subheading = $null <# Emit markdown TODO: - - autogenerate TOC + - auto-generate TOC #> @" # VT Function Support @@ -125,7 +125,7 @@ function Get-SequenceIndexMarkdown { * [ANSI](#ansi) * [DEC Private](#dec-private) * [Editing Functions](#editing-functions) -* [OLTP Features](#oltp-features) +* [OLTP Features](#OLTP-features) * [Rectangular Area Operations](#rectangular-area-operations) * [Data Integrity](#data-integrity) * [Macros](#macros) @@ -133,7 +133,7 @@ function Get-SequenceIndexMarkdown { * [Cursor Save Buffer](#cursor-save-buffer) * [Terminal State Interrogation](#terminal-state-interrogation) * [Keyboard Processing Functions](#keyboard-processing-functions) -* [Soft Key Mapping (UDK)](#soft-key-mapping-udk) +* [Soft Key Mapping (UDK)](#soft-key-mapping-UDK) * [Soft Fonts (DRCS)](#soft-fonts-drcs) * [Printing](#printing) * [Terminal Communication and Synchronization](#terminal-communication-and-synchronization) @@ -145,7 +145,7 @@ $($sequences | ForEach-Object { if ($method = $base[$_.sequence]) { $_.ImplementedBy = $method $_.ConsoleHost = $conhost[$method] - $_.Terminal = $terminal[$method] + $_.Terminal = $terminal[$method] } # "Sequence","Associated","Description","Origin","Heading","Subheading", "ImplementedBy", "ConsoleHost","Terminal" $c0 = "[$($_.Sequence)]($prefix$($_.sequence).html ""View page on vt100.net"")" @@ -202,7 +202,7 @@ function Show-Summary { $summary = @" `e[1mSequence Support:`e[0m - `e[7m {0:000} `e[0m known in master-sequence-list.csv. + `e[7m {0:000} `e[0m known in master-sequence-list.csv. `e[7m {1:000} `e[0m common members in ITermDispatch base, of which: `e[7m {2:000} `e[0m are implemented by ConsoleHost. `e[7m {3:000} `e[0m are implemented by Windows Terminal. @@ -219,12 +219,12 @@ function Show-Summary { Read-SourceFiles if (-not $SummaryOnly.IsPresent) { - + $markdown = Get-SequenceIndexMarkdown if ($PSCmdlet.ParameterSetName -eq "file") { # send to file and overwrite - $markdown | Out-File -FilePath $OutFile -Force:$Force.IsPresent -Encoding utf8NoBOM + $markdown | Out-File -FilePath $OutFile -Force:$Force.IsPresent -Encoding utf8NoBOM } else { # send to STDOUT $markdown