Compare commits

...

8 Commits

Author SHA1 Message Date
Dustin L. Howett
719330a90e Migrate spelling-0.0.21 changes from main 2020-11-13 14:01:07 -08:00
Dustin L. Howett
0b8255282d Migrate spelling-0.0.19 changes from main 2020-11-13 14:01:07 -08:00
Dustin Howett
3ea1ae242a HAX HAX HAX clang tidy 2020-11-13 14:01:07 -08:00
Dustin Howett
307f0d0b62 Merge remote-tracking branch 'origin/main' into dev/duhowett/clang 2020-11-10 10:30:23 -08:00
Dustin L. Howett
4d999decf5 HAX: build with clang 2020-07-19 14:05:45 -07:00
Dustin L. Howett
c3fddce2af Fix -Wextra-tokens (15 instances) 2020-07-19 13:41:55 -07:00
Dustin L. Howett
31a6579e37 Fix the only instance of -Wrange-loop-construct
Clang warned that this loop copied a non-trivial object (vector)
2020-07-15 12:11:58 -07:00
Dustin L. Howett
6e79edcea9 Remove typename from non-dependent names
Using typename on names that do not depend on another template is
invalid C++.
2020-07-15 12:10:06 -07:00
89 changed files with 2203 additions and 482015 deletions

View File

@@ -1,25 +0,0 @@
<details>
<summary>
:pencil2: Contributor please read this
</summary>
By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
:warning: The command is written for posix shells. You can copy the contents of each `perl` command excluding the outer `'` marks and dropping any `'"`/`"'` quotation mark pairs into a file and then run `perl file.pl` from the root of the repository to run the code. Alternatively, you can manually insert the items...
If the listed items are:
* ... **misspelled**, then please *correct* them instead of using the command.
* ... *names*, please add them to `.github/actions/spell-check/dictionary/names.txt`.
* ... APIs, you can add them to a file in `.github/actions/spell-check/dictionary/`.
* ... just things you're using, please add them to an appropriate file in `.github/actions/spell-check/expect/`.
* ... tokens you only need in one place and shouldn't *generally be used*, you can add an item in an appropriate file in `.github/actions/spell-check/patterns/`.
See the `README.md` in each directory for more information.
:microscope: You can test your commits **without** *appending* to a PR by creating a new branch with that extra change and pushing it to your fork. The [:check-spelling](https://github.com/marketplace/actions/check-spelling) action will run in response to your **push** -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. :wink:
</details>
#### :warning: Reviewers
At present, the action that triggered this message will not show its :x: in this PR unless the branch is within this repository.
Thus, you **should** make sure that this comment has been addressed before encouraging the merge bot to merge this PR.

View File

@@ -1,72 +0,0 @@
ACCEPTFILES
ACCESSDENIED
alignof
bitfield
bitfields
CLASSNOTAVAILABLE
COLORPROPERTY
CXICON
CYICON
environstrings
EXPCMDFLAGS
EXPCMDSTATE
fullkbd
futex
GETDESKWALLPAPER
GETHIGHCONTRAST
Hashtable
HIGHCONTRASTON
HIGHCONTRASTW
href
IAsync
IBind
IBox
IClass
IComparable
ICustom
IDialog
IDirect
IExplorer
IInheritable
IMap
IObject
IStorage
LCID
llabs
lround
LSHIFT
msappx
NCHITTEST
NCLBUTTONDBLCLK
NCRBUTTONDBLCLK
NOAGGREGATION
NOREDIRECTIONBITMAP
oaidl
ocidl
otms
OUTLINETEXTMETRICW
overridable
PAGESCROLL
RETURNCMD
rfind
roundf
RSHIFT
rx
schandle
serializer
SIZENS
spsc
sregex
STDCPP
strchr
syscall
THEMECHANGED
tmp
tx
UPDATEINIFILE
userenv
wcstoui
wsregex
XDocument
XElement
XParse

View File

@@ -1,782 +0,0 @@
snow
ghost-white
ghostwhite
white-smoke
whitesmoke
gainsboro
floral-white
floralwhite
old-lace
oldlace
linen
antique-white
antiquewhite
papaya-whip
papayawhip
blanched-almond
blanchedalmond
bisque
peach-puff
peachpuff
navajo-white
navajowhite
moccasin
cornsilk
ivory
lemon-chiffon
lemonchiffon
seashell
honeydew
mint-cream
mintcream
azure
alice-blue
aliceblue
lavender
lavender-blush
lavenderblush
misty-rose
mistyrose
white
black
dark-slate-gray
darkslategray
dark-slate-grey
darkslategrey
dim-gray
dimgray
dim-grey
dimgrey
slate-gray
slategray
slate-grey
slategrey
light-slate-gray
lightslategray
light-slate-grey
lightslategrey
gray
grey
xray
x11gray
xrey
x11grey
web-gray
webgray
web-grey
webgrey
light-grey
lightgrey
light-gray
lightgray
midnight-blue
midnightblue
navy
navy-blue
navyblue
cornflower-blue
cornflowerblue
dark-slate-blue
darkslateblue
slate-blue
slateblue
medium-slate-blue
mediumslateblue
light-slate-blue
lightslateblue
medium-blue
mediumblue
royal-blue
royalblue
blue
dodger-blue
dodgerblue
deep-sky-blue
deepskyblue
sky-blue
skyblue
light-sky-blue
lightskyblue
steel-blue
steelblue
light-steel-blue
lightsteelblue
light-blue
lightblue
powder-blue
powderblue
pale-turquoise
paleturquoise
dark-turquoise
darkturquoise
medium-turquoise
mediumturquoise
turquoise
cyan
aqua
light-cyan
lightcyan
cadet-blue
cadetblue
medium-aquamarine
mediumaquamarine
aquamarine
dark-green
darkgreen
dark-olive-green
darkolivegreen
dark-sea-green
darkseagreen
sea-green
seagreen
medium-sea-green
mediumseagreen
light-sea-green
lightseagreen
pale-green
palegreen
spring-green
springgreen
lawn-green
lawngreen
green
lime
xreen
x11green
web-green
webgreen
chartreuse
medium-spring-green
mediumspringgreen
green-yellow
greenyellow
lime-green
limegreen
yellow-green
yellowgreen
forest-green
forestgreen
olive-drab
olivedrab
dark-khaki
darkkhaki
khaki
pale-goldenrod
palegoldenrod
light-goldenrod-yellow
lightgoldenrodyellow
light-yellow
lightyellow
yellow
gold
light-goldenrod
lightgoldenrod
goldenrod
dark-goldenrod
darkgoldenrod
rosy-brown
rosybrown
indian-red
indianred
saddle-brown
saddlebrown
sienna
peru
burlywood
beige
wheat
sandy-brown
sandybrown
tan
chocolate
firebrick
brown
dark-salmon
darksalmon
salmon
light-salmon
lightsalmon
orange
dark-orange
darkorange
coral
light-coral
lightcoral
tomato
orange-red
orangered
red
hot-pink
hotpink
deep-pink
deeppink
pink
light-pink
lightpink
pale-violet-red
palevioletred
maroon
xaroon
x11maroon
web-maroon
webmaroon
medium-violet-red
mediumvioletred
violet-red
violetred
magenta
fuchsia
violet
plum
orchid
medium-orchid
mediumorchid
dark-orchid
darkorchid
dark-violet
darkviolet
blue-violet
blueviolet
purple
xurple
x11purple
web-purple
webpurple
medium-purple
mediumpurple
thistle
snow1
snow2
snow3
snow4
seashell1
seashell2
seashell3
seashell4
antiquewhite1
antiquewhite2
antiquewhite3
antiquewhite4
bisque1
bisque2
bisque3
bisque4
peachpuff1
peachpuff2
peachpuff3
peachpuff4
navajowhite1
navajowhite2
navajowhite3
navajowhite4
lemonchiffon1
lemonchiffon2
lemonchiffon3
lemonchiffon4
cornsilk1
cornsilk2
cornsilk3
cornsilk4
ivory1
ivory2
ivory3
ivory4
honeydew1
honeydew2
honeydew3
honeydew4
lavenderblush1
lavenderblush2
lavenderblush3
lavenderblush4
mistyrose1
mistyrose2
mistyrose3
mistyrose4
azure1
azure2
azure3
azure4
slateblue1
slateblue2
slateblue3
slateblue4
royalblue1
royalblue2
royalblue3
royalblue4
blue1
blue2
blue3
blue4
dodgerblue1
dodgerblue2
dodgerblue3
dodgerblue4
steelblue1
steelblue2
steelblue3
steelblue4
deepskyblue1
deepskyblue2
deepskyblue3
deepskyblue4
skyblue1
skyblue2
skyblue3
skyblue4
lightskyblue1
lightskyblue2
lightskyblue3
lightskyblue4
slategray1
slategray2
slategray3
slategray4
lightsteelblue1
lightsteelblue2
lightsteelblue3
lightsteelblue4
lightblue1
lightblue2
lightblue3
lightblue4
lightcyan1
lightcyan2
lightcyan3
lightcyan4
paleturquoise1
paleturquoise2
paleturquoise3
paleturquoise4
cadetblue1
cadetblue2
cadetblue3
cadetblue4
turquoise1
turquoise2
turquoise3
turquoise4
cyan1
cyan2
cyan3
cyan4
darkslategray1
darkslategray2
darkslategray3
darkslategray4
aquamarine1
aquamarine2
aquamarine3
aquamarine4
darkseagreen1
darkseagreen2
darkseagreen3
darkseagreen4
seagreen1
seagreen2
seagreen3
seagreen4
palegreen1
palegreen2
palegreen3
palegreen4
springgreen1
springgreen2
springgreen3
springgreen4
green1
green2
green3
green4
chartreuse1
chartreuse2
chartreuse3
chartreuse4
olivedrab1
olivedrab2
olivedrab3
olivedrab4
darkolivegreen1
darkolivegreen2
darkolivegreen3
darkolivegreen4
khaki1
khaki2
khaki3
khaki4
lightgoldenrod1
lightgoldenrod2
lightgoldenrod3
lightgoldenrod4
lightyellow1
lightyellow2
lightyellow3
lightyellow4
yellow1
yellow2
yellow3
yellow4
gold1
gold2
gold3
gold4
goldenrod1
goldenrod2
goldenrod3
goldenrod4
darkgoldenrod1
darkgoldenrod2
darkgoldenrod3
darkgoldenrod4
rosybrown1
rosybrown2
rosybrown3
rosybrown4
indianred1
indianred2
indianred3
indianred4
sienna1
sienna2
sienna3
sienna4
burlywood1
burlywood2
burlywood3
burlywood4
wheat1
wheat2
wheat3
wheat4
tan1
tan2
tan3
tan4
chocolate1
chocolate2
chocolate3
chocolate4
firebrick1
firebrick2
firebrick3
firebrick4
brown1
brown2
brown3
brown4
salmon1
salmon2
salmon3
salmon4
lightsalmon1
lightsalmon2
lightsalmon3
lightsalmon4
orange1
orange2
orange3
orange4
darkorange1
darkorange2
darkorange3
darkorange4
coral1
coral2
coral3
coral4
tomato1
tomato2
tomato3
tomato4
orangered1
orangered2
orangered3
orangered4
red1
red2
red3
red4
deeppink1
deeppink2
deeppink3
deeppink4
hotpink1
hotpink2
hotpink3
hotpink4
pink1
pink2
pink3
pink4
lightpink1
lightpink2
lightpink3
lightpink4
palevioletred1
palevioletred2
palevioletred3
palevioletred4
maroon1
maroon2
maroon3
maroon4
violetred1
violetred2
violetred3
violetred4
magenta1
magenta2
magenta3
magenta4
orchid1
orchid2
orchid3
orchid4
plum1
plum2
plum3
plum4
mediumorchid1
mediumorchid2
mediumorchid3
mediumorchid4
darkorchid1
darkorchid2
darkorchid3
darkorchid4
purple1
purple2
purple3
purple4
mediumpurple1
mediumpurple2
mediumpurple3
mediumpurple4
thistle1
thistle2
thistle3
thistle4
gray0
grey0
gray1
grey1
gray2
grey2
gray3
grey3
gray4
grey4
gray5
grey5
gray6
grey6
gray7
grey7
gray8
grey8
gray9
grey9
gray10
grey10
gray11
grey11
gray12
grey12
gray13
grey13
gray14
grey14
gray15
grey15
gray16
grey16
gray17
grey17
gray18
grey18
gray19
grey19
gray20
grey20
gray21
grey21
gray22
grey22
gray23
grey23
gray24
grey24
gray25
grey25
gray26
grey26
gray27
grey27
gray28
grey28
gray29
grey29
gray30
grey30
gray31
grey31
gray32
grey32
gray33
grey33
gray34
grey34
gray35
grey35
gray36
grey36
gray37
grey37
gray38
grey38
gray39
grey39
gray40
grey40
gray41
grey41
gray42
grey42
gray43
grey43
gray44
grey44
gray45
grey45
gray46
grey46
gray47
grey47
gray48
grey48
gray49
grey49
gray50
grey50
gray51
grey51
gray52
grey52
gray53
grey53
gray54
grey54
gray55
grey55
gray56
grey56
gray57
grey57
gray58
grey58
gray59
grey59
gray60
grey60
gray61
grey61
gray62
grey62
gray63
grey63
gray64
grey64
gray65
grey65
gray66
grey66
gray67
grey67
gray68
grey68
gray69
grey69
gray70
grey70
gray71
grey71
gray72
grey72
gray73
grey73
gray74
grey74
gray75
grey75
gray76
grey76
gray77
grey77
gray78
grey78
gray79
grey79
gray80
grey80
gray81
grey81
gray82
grey82
gray83
grey83
gray84
grey84
gray85
grey85
gray86
grey86
gray87
grey87
gray88
grey88
gray89
grey89
gray90
grey90
gray91
grey91
gray92
grey92
gray93
grey93
gray94
grey94
gray95
grey95
gray96
grey96
gray97
grey97
gray98
grey98
gray99
grey99
gray100
grey100
dark-grey
darkgrey
dark-gray
darkgray
dark-blue
darkblue
dark-cyan
darkcyan
dark-magenta
darkmagenta
dark-red
darkred
light-green
lightgreen
crimson
indigo
olive
rebecca-purple
rebeccapurple
silver
teal

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +0,0 @@
powf
sqrtf
isnan

View File

@@ -1,40 +0,0 @@
ACLs
altform
appendwttlogging
backplating
CPRs
DACL
DACLs
dotnetfeed
DWINRT
enablewttlogging
LKG
mfcribbon
microsoft
microsoftonline
netcore
osgvsowi
pgc
pgo
pgosweep
powerrename
powershell
propkey
pscustomobject
robocopy
SACLs
Shobjidl
Skype
sysnative
systemroot
taskkill
tasklist
tdbuildteamid
vcruntime
visualstudio
VSTHRD
wlk
wslpath
wtl
wtt
wttlog

View File

@@ -1,64 +0,0 @@
(?:^|/)dirs$
(?:^|/)go\.mod$
(?:^|/)go\.sum$
(?:^|/)package-lock\.json$
(?:^|/)sources(?:|\.dep)$
SUMS$
\.ai$
\.bmp$
\.cer$
\.class$
\.crl$
\.crt$
\.csr$
\.dll$
\.DS_Store$
\.eot$
\.eps$
\.exe$
\.gif$
\.graffle$
\.gz$
\.icns$
\.ico$
\.jar$
\.jpeg$
\.jpg$
\.key$
\.lib$
\.lock$
\.map$
\.min\..
\.mp3$
\.mp4$
\.otf$
\.pbxproj$
\.pdf$
\.pem$
\.png$
\.psd$
\.runsettings$
\.sig$
\.so$
\.svg$
\.svgz$
\.tar$
\.tgz$
\.ttf$
\.vsdx$
\.woff
\.xcf$
\.xls
\.xpm$
\.yml$
\.zip$
^consolegit2gitfilters\.json$
^dep/
^oss/
^doc/reference/UTF8-torture-test\.txt$
^src/interactivity/onecore/BgfxEngine\.
^src/renderer/wddmcon/WddmConRenderer\.
^src/terminal/parser/ft_fuzzer/VTCommandFuzzer\.cpp$
^src/tools/U8U16Test/(?:fr|ru|zh)\.txt$
^\.github/actions/spell-check/
^\.gitignore$

View File

@@ -1,7 +0,0 @@
autogenerated
CPPCORECHECK
Debian
filepath
inplace
KEYBDINPUT
WINVER

View File

@@ -1,15 +0,0 @@
http
td
www
ecma
rapidtables
WCAG
freedesktop
ycombinator
robertelder
kovidgoyal
leonerd
fixterms
uk
winui
appshellintegration

View File

@@ -1,23 +0,0 @@
https://(?:(?:[-a-zA-Z0-9?&=]*\.|)microsoft\.com)/[-a-zA-Z0-9?&=_#\/.]*
https://aka\.ms/[-a-zA-Z0-9?&=\/_]*
https://www\.itscj\.ipsj\.or\.jp/iso-ir/[-0-9]+\.pdf
https://www\.vt100\.net/docs/[-a-zA-Z0-9#_\/.]*
https://www.w3.org/[-a-zA-Z0-9?&=\/_#]*
https://(?:(?:www\.|)youtube\.com|youtu.be)/[-a-zA-Z0-9?&=]*
https://[a-z-]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
[Pp]ublicKeyToken="?[0-9a-fA-F]{16}"?
(?:[{"]|UniqueIdentifier>)[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}(?:[}"]|</UniqueIdentifier)
(?:0[Xx]|\\x|U\+|#)[a-f0-9A-FGgRr]{2,}[Uu]?[Ll]{0,2}\b
microsoft/cascadia-code\@[0-9a-fA-F]{40}
\d+x\d+Logo
Scro\&ll
# selectionInput.cpp
:\\windows\\syste\b
TestUtils::VerifyExpectedString\(tb, L"[^"]+"
(?:hostSm|mach)\.ProcessString\(L"[^"]+"
\b([A-Za-z])\1{3,}\b
0x[0-9A-Za-z]+
Base64::s_(?:En|De)code\(L"[^"]+"
VERIFY_ARE_EQUAL\(L"[^"]+"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+/"
std::memory_order_[\w]+

15
.github/actions/spelling/README.md vendored Normal file
View File

@@ -0,0 +1,15 @@
# check-spelling/check-spelling configuration
File | Purpose | Format | Info
-|-|-|-
[allow/*.txt](allow/) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow)
[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject)
[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes)
[patterns/*.txt](patterns/) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
[candidate.patterns](candidate.patterns) | Patterns that might be worth adding to [patterns.txt](patterns.txt) | perl regular expression with optional comment block introductions (all matches will be suggested) | [candidates](https://github.com/check-spelling/check-spelling/wiki/Feature:-Suggest-patterns)
[line_forbidden.patterns](line_forbidden.patterns) | Patterns to flag in checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
[expect/*.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect)
[advice.md](advice.md) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice)
Note: you can replace any of these files with a directory by the same name (minus the suffix)
and then include multiple files inside that directory (with that suffix) to merge multiple files together.

48
.github/actions/spelling/advice.md vendored Normal file
View File

@@ -0,0 +1,48 @@
<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
<details>
<summary>
:pencil2: Contributor please read this
</summary>
By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
:warning: The command is written for posix shells. If it doesn't work for you, you can manually _add_ (one word per line) / _remove_ items to `expect.txt` and the `excludes.txt` files.
If the listed items are:
* ... **misspelled**, then please *correct* them instead of using the command.
* ... *names*, please add them to `.github/actions/spelling/allow/names.txt`.
* ... APIs, you can add them to a file in `.github/actions/spelling/allow/`.
* ... just things you're using, please add them to an appropriate file in `.github/actions/spelling/expect/`.
* ... tokens you only need in one place and shouldn't *generally be used*, you can add an item in an appropriate file in `.github/actions/spelling/patterns/`.
See the `README.md` in each directory for more information.
:microscope: You can test your commits **without** *appending* to a PR by creating a new branch with that extra change and pushing it to your fork. The [check-spelling](https://github.com/marketplace/actions/check-spelling) action will run in response to your **push** -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. :wink:
<details><summary>If the flagged items are :exploding_head: false positives</summary>
If items relate to a ...
* binary file (or some other file you wouldn't want to check at all).
Please add a file path to the `excludes.txt` file matching the containing file.
File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).
* well-formed pattern.
If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
try adding it to the `patterns.txt` file.
Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
</details>
</details>

View File

@@ -1,6 +1,6 @@
# Dictionaries are lists of words to accept unconditionally
# Allow files are lists of words to accept unconditionally
While check spelling will complain about a whitelisted word
While check spelling will complain about an expected word
which is no longer present, you can include things here even if
they are not otherwise present in the repository.
@@ -8,11 +8,11 @@ E.g., you could include a list of system APIs here, or potential
contributors (so that if a future commit includes their name,
it'll be accepted).
### Files
## Files
| File | Description |
| ---- | ----------- |
| [Dictionary](dictionary.txt) | Primary US English dictionary |
| [Allow](allow.txt) | Supplements to the dictionary |
| [Chinese](chinese.txt) | Chinese words |
| [Japanese](japanese.txt) | Japanese words |
| [Microsoft](microsoft.txt) | Microsoft brand items |

108
.github/actions/spelling/allow/allow.txt vendored Normal file
View File

@@ -0,0 +1,108 @@
admins
allcolors
Apc
apc
breadcrumb
breadcrumbs
bsd
calt
ccmp
changelog
clickable
clig
CMMI
copyable
cybersecurity
dalet
Dcs
dcs
dialytika
dje
downside
downsides
dze
dzhe
EDDB
EDDC
Enum'd
Fitt
formattings
FTCS
ftp
fvar
gantt
gcc
geeksforgeeks
ghe
github
gje
godbolt
hostname
hostnames
https
hyperlink
hyperlinking
hyperlinks
iconify
img
inlined
It'd
kje
libfuzzer
libuv
liga
lje
Llast
llvm
Lmid
locl
lol
lorem
Lorigin
maxed
minimalistic
mkmk
mnt
mru
nje
noreply
ogonek
ok'd
overlined
pipeline
postmodern
ptys
qof
qps
rclt
reimplementation
reserialization
reserialize
reserializes
rlig
runtimes
shcha
slnt
Sos
ssh
timeline
timelines
timestamped
TLDR
tokenizes
tonos
toolset
tshe
ubuntu
uiatextrange
UIs
und
unregister
versioned
vsdevcmd
We'd
wildcards
XBox
YBox
yeru
zhe

248
.github/actions/spelling/allow/apis.txt vendored Normal file
View File

@@ -0,0 +1,248 @@
ACCEPTFILES
ACCESSDENIED
acl
aclapi
alignas
alignof
APPLYTOSUBMENUS
appxrecipe
bitfield
bitfields
BUILDBRANCH
BUILDMSG
BUILDNUMBER
BYCOMMAND
BYPOSITION
charconv
CLASSNOTAVAILABLE
CLOSEAPP
cmdletbinding
COLORPROPERTY
colspan
COMDLG
commandlinetoargv
comparand
cstdint
CXICON
CYICON
Dacl
dataobject
dcomp
DERR
dlldata
DNE
DONTADDTORECENT
DWMSBT
DWMWA
DWMWA
DWORDLONG
endfor
ENDSESSION
enumset
environstrings
EXPCMDFLAGS
EXPCMDSTATE
filetime
FILTERSPEC
FORCEFILESYSTEM
FORCEMINIMIZE
frac
fullkbd
futex
GETDESKWALLPAPER
GETHIGHCONTRAST
GETMOUSEHOVERTIME
Hashtable
HIGHCONTRASTON
HIGHCONTRASTW
hotkeys
href
hrgn
HTCLOSE
hwinsta
HWINSTA
IActivation
IApp
IAppearance
IAsync
IBind
IBox
IClass
IComparable
IComparer
IConnection
ICustom
IDialog
IDirect
IExplorer
IFACEMETHOD
IFile
IGraphics
IInheritable
IMap
IMonarch
IObject
iosfwd
IPackage
IPeasant
ISetup
isspace
IStorage
istream
IStringable
ITab
ITaskbar
itow
IUri
IVirtual
KEYSELECT
LCID
llabs
llu
localtime
lround
Lsa
lsass
LSHIFT
LTGRAY
MAINWINDOW
memchr
memicmp
MENUCOMMAND
MENUDATA
MENUINFO
MENUITEMINFOW
mmeapi
MOUSELEAVE
mov
mptt
msappx
MULTIPLEUSE
NCHITTEST
NCLBUTTONDBLCLK
NCMOUSELEAVE
NCMOUSEMOVE
NCRBUTTONDBLCLK
NIF
NIN
NOAGGREGATION
NOASYNC
NOCHANGEDIR
NOPROGRESS
NOREDIRECTIONBITMAP
NOREPEAT
NOTIFYBYPOS
NOTIFYICON
NOTIFYICONDATA
ntprivapi
oaidl
ocidl
ODR
offsetof
ofstream
onefuzz
osver
OSVERSIONINFOEXW
otms
OUTLINETEXTMETRICW
overridable
PACL
PAGESCROLL
PATINVERT
PEXPLICIT
PICKFOLDERS
pmr
ptstr
QUERYENDSESSION
rcx
REGCLS
RETURNCMD
rfind
ROOTOWNER
roundf
RSHIFT
SACL
schandle
semver
serializer
SETVERSION
SHELLEXECUTEINFOW
shobjidl
SHOWHIDE
SHOWMINIMIZED
SHOWTIP
SINGLEUSE
SIZENS
smoothstep
snprintf
spsc
sregex
SRWLOC
SRWLOCK
STDCPP
STDMETHOD
strchr
strcpy
streambuf
strtoul
Stubless
Subheader
Subpage
syscall
SYSTEMBACKDROP
TABROW
TASKBARCREATED
TBPF
THEMECHANGED
tlg
TME
tmp
tmpdir
tolower
toupper
TRACKMOUSEEVENT
TTask
TVal
UChar
UFIELD
ULARGE
UOI
UPDATEINIFILE
userenv
USEROBJECTFLAGS
Viewbox
virtualalloc
wcsstr
wcstoui
winmain
winsta
winstamin
wmemcmp
wpc
WSF
wsregex
wwinmain
xchg
XDocument
XElement
xfacet
xhash
XIcon
xiosbase
xlocale
xlocbuf
xlocinfo
xlocmes
xlocmon
xlocnum
xloctime
XMax
xmemory
XParse
xpath
xstddef
xstring
xtree
xutility
YIcon
YMax

View File

@@ -0,0 +1,117 @@
alice
aliceblue
antiquewhite
blanchedalmond
blueviolet
burlywood
cadetblue
cornflowerblue
cornsilk
cyan
darkblue
darkcyan
darkgoldenrod
darkgray
darkgreen
darkgrey
darkkhaki
darkmagenta
darkolivegreen
darkorange
darkorchid
darkred
darksalmon
darkseagreen
darkslateblue
darkslategray
darkslategrey
darkturquoise
darkviolet
deeppink
deepskyblue
dimgray
dimgrey
dodgerblue
firebrick
floralwhite
forestgreen
gainsboro
ghostwhite
greenyellow
hotpink
indian
indianred
lavenderblush
lawngreen
lemonchiffon
lightblue
lightcoral
lightcyan
lightgoldenrod
lightgoldenrodyellow
lightgray
lightgreen
lightgrey
lightpink
lightsalmon
lightseagreen
lightskyblue
lightslateblue
lightslategray
lightslategrey
lightsteelblue
lightyellow
limegreen
mediumaquamarine
mediumblue
mediumorchid
mediumpurple
mediumseagreen
mediumslateblue
mediumspringgreen
mediumturquoise
mediumvioletred
midnightblue
mintcream
mistyrose
navajo
navajowhite
navyblue
oldlace
olivedrab
orangered
palegoldenrod
palegreen
paleturquoise
palevioletred
papayawhip
peachpuff
peru
powderblue
rebecca
rebeccapurple
rosybrown
royalblue
saddlebrown
sandybrown
seagreen
sienna
skyblue
slateblue
slategray
slategrey
springgreen
steelblue
violetred
webgray
webgreen
webgrey
webmaroon
webpurple
whitesmoke
xaroon
xray
xreen
xrey
xurple
yellowgreen

View File

@@ -1,8 +1,10 @@
Consolas
emoji
emojis
Extralight
Gabriola
Iosevka
MDL
Monofur
Segoe
wght

11
.github/actions/spelling/allow/math.txt vendored Normal file
View File

@@ -0,0 +1,11 @@
atan
CPrime
HBar
HPrime
isnan
LPrime
LStep
powf
RSub
sqrtf
ULP

View File

@@ -0,0 +1,85 @@
ACLs
ADMINS
advapi
altform
altforms
appendwttlogging
appx
appxbundle
appxerror
appxmanifest
ATL
backplating
bitmaps
BOMs
CPLs
cpptools
cppvsdbg
CPRs
cryptbase
DACL
DACLs
defaultlib
diffs
disposables
dotnetfeed
DTDs
DWINRT
enablewttlogging
Intelli
IVisual
libucrt
libucrtd
LKG
LOCKFILE
Lxss
mfcribbon
microsoft
microsoftonline
MSAA
msixbundle
MSVC
MSVCP
muxc
netcore
Onefuzz
osgvsowi
PFILETIME
pgc
pgo
pgosweep
powerrename
powershell
propkey
pscustomobject
QWORD
regedit
robocopy
SACLs
sdkddkver
Shobjidl
Skype
SRW
sxs
Sysinternals
sysnative
systemroot
taskkill
tasklist
tdbuildteamid
ucrt
ucrtd
unvirtualized
VCRT
vcruntime
Virtualization
visualstudio
vscode
VSTHRD
winsdkver
wlk
wslpath
wtl
wtt
wttlog
Xamarin

View File

@@ -1,35 +1,49 @@
Anup
austdi
arkthur
Ballmer
bhoj
Bhojwani
Bluloco
carlos
dhowett
Diviness
dsafa
duhowett
DXP
ekg
eryksun
ethanschoonover
Firefox
Gatta
glsl
Gravell
Grie
Griese
Hernan
Howett
Illhardt
iquilezles
italo
jantari
jerrysh
Kaiyu
kimwalisch
KMehrain
KODELIFE
Kodelife
Kourosh
kowalczyk
leonmsft
Lepilleur
lhecker
lukesampson
Macbook
Manandhar
masserano
mbadolato
Mehrain
menger
mgravell
michaelniksa
michkap
@@ -43,7 +57,10 @@ nvaccess
nvda
oising
oldnewthing
opengl
osgwiki
pabhojwa
panos
paulcam
pauldotknopf
PGP
@@ -51,11 +68,18 @@ Pham
Rincewind
rprichard
Schoonover
shadertoy
Shomnipotence
simioni
Somuah
sonph
sonpham
stakx
talo
thereses
Walisch
WDX
Wellons
Wirt
Wojciech
zadjii

View File

@@ -0,0 +1,523 @@
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
# marker for ignoring a comment to the end of the line
// #no-spell-check.*$
# patch hunk comments
^\@\@ -\d+(?:,\d+|) \+\d+(?:,\d+|) \@\@ .*
# git index header
index [0-9a-z]{7,40}\.\.[0-9a-z]{7,40}
# cid urls
(['"])cid:.*?\g{-1}
# data url in parens
\(data:[^)]*?(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})[^)]*\)
# data url in quotes
([`'"])data:.*?(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1}
# data url
data:[-a-zA-Z=;:/0-9+]*,\S*
# mailto urls
mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,}
# magnet urls
magnet:[?=:\w]+
# magnet urls
"magnet:[^"]+"
# obs:
"obs:[^"]*"
# The `\b` here means a break, it's the fancy way to handle urls, but it makes things harder to read
# In this examples content, I'm using a number of different ways to match things to show various approaches
# asciinema
\basciinema\.org/a/[0-9a-zA-Z]+
# apple
\bdeveloper\.apple\.com/[-\w?=/]+
# Apple music
\bembed\.music\.apple\.com/fr/playlist/usr-share/[-\w.]+
# appveyor api
\bci\.appveyor\.com/api/projects/status/[0-9a-z]+
# appveyor project
\bci\.appveyor\.com/project/(?:[^/\s"]*/){2}builds?/\d+/job/[0-9a-z]+
# Amazon
# Amazon
\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)
# AWS S3
\b\w*\.s3[^.]*\.amazonaws\.com/[-\w/&#%_?:=]*
# AWS execute-api
\b[0-9a-z]{10}\.execute-api\.[-0-9a-z]+\.amazonaws\.com\b
# AWS ELB
\b\w+\.[-0-9a-z]+\.elb\.amazonaws\.com\b
# AWS SNS
\bsns\.[-0-9a-z]+.amazonaws\.com/[-\w/&#%_?:=]*
# AWS VPC
vpc-\w+
# While you could try to match `http://` and `https://` by using `s?` in `https?://`, sometimes there
# YouTube url
\b(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|user/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_%]*
# YouTube music
\bmusic\.youtube\.com/youtubei/v1/browse(?:[?&]\w+=[-a-zA-Z0-9?&=_]*)
# YouTube tag
<\s*youtube\s+id=['"][-a-zA-Z0-9?_]*['"]
# YouTube image
\bimg\.youtube\.com/vi/[-a-zA-Z0-9?&=_]*
# Google Accounts
\baccounts.google.com/[-_/?=.:;+%&0-9a-zA-Z]*
# Google Analytics
\bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]*
# Google APIs
\bgoogleapis\.(?:com|dev)/[a-z]+/(?:v\d+/|)[a-z]+/[-@:./?=\w+|&]+
# Google Storage
\b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|)
# Google Calendar
\bcalendar\.google\.com/calendar(?:/u/\d+|)/embed\?src=[@./?=\w&%]+
\w+\@group\.calendar\.google\.com\b
# Google DataStudio
\bdatastudio\.google\.com/(?:(?:c/|)u/\d+/|)(?:embed/|)(?:open|reporting|datasources|s)/[-0-9a-zA-Z]+(?:/page/[-0-9a-zA-Z]+|)
# The leading `/` here is as opposed to the `\b` above
# ... a short way to match `https://` or `http://` since most urls have one of those prefixes
# Google Docs
/docs\.google\.com/[a-z]+/(?:ccc\?key=\w+|(?:u/\d+|d/(?:e/|)[0-9a-zA-Z_-]+/)?(?:edit\?[-\w=#.]*|/\?[\w=&]*|))
# Google Drive
\bdrive\.google\.com/(?:file/d/|open)[-0-9a-zA-Z_?=]*
# Google Groups
\bgroups\.google\.com/(?:(?:forum/#!|d/)(?:msg|topics?|searchin)|a)/[^/\s"]+/[-a-zA-Z0-9$]+(?:/[-a-zA-Z0-9]+)*
# Google Maps
\bmaps\.google\.com/maps\?[\w&;=]*
# Google themes
themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+.
# Google CDN
\bclients2\.google(?:usercontent|)\.com[-0-9a-zA-Z/.]*
# Goo.gl
/goo\.gl/[a-zA-Z0-9]+
# Google Chrome Store
\bchrome\.google\.com/webstore/detail/[-\w]*(?:/\w*|)
# Google Books
\bgoogle\.(?:\w{2,4})/books(?:/\w+)*\?[-\w\d=&#.]*
# Google Fonts
\bfonts\.(?:googleapis|gstatic)\.com/[-/?=:;+&0-9a-zA-Z]*
# Google Forms
\bforms\.gle/\w+
# Google Scholar
\bscholar\.google\.com/citations\?user=[A-Za-z0-9_]+
# Google Colab Research Drive
\bcolab\.research\.google\.com/drive/[-0-9a-zA-Z_?=]*
# GitHub SHAs (api)
\bapi.github\.com/repos(?:/[^/\s"]+){3}/[0-9a-f]+\b
# GitHub SHAs (markdown)
(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)
# GitHub SHAs
\bgithub\.com(?:/[^/\s"]+){2}[@#][0-9a-f]+\b
# GitHub wiki
\bgithub\.com/(?:[^/]+/){2}wiki/(?:(?:[^/]+/|)_history|[^/]+(?:/_compare|)/[0-9a-f.]{40,})\b
# githubusercontent
/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
# githubassets
\bgithubassets.com/[0-9a-f]+(?:[-/\w.]+)
# gist github
\bgist\.github\.com/[^/\s"]+/[0-9a-f]+
# git.io
\bgit\.io/[0-9a-zA-Z]+
# GitHub JSON
"node_id": "[-a-zA-Z=;:/0-9+]*"
# Contributor
\[[^\]]+\]\(https://github\.com/[^/\s"]+\)
# GHSA
GHSA(?:-[0-9a-z]{4}){3}
# GitLab commit
\bgitlab\.[^/\s"]*/\S+/\S+/commit/[0-9a-f]{7,16}#[0-9a-f]{40}\b
# GitLab merge requests
\bgitlab\.[^/\s"]*/\S+/\S+/-/merge_requests/\d+/diffs#[0-9a-f]{40}\b
# GitLab uploads
\bgitlab\.[^/\s"]*/uploads/[-a-zA-Z=;:/0-9+]*
# GitLab commits
\bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b
# binanace
accounts.binance.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]*
# bitbucket diff
\bapi\.bitbucket\.org/\d+\.\d+/repositories/(?:[^/\s"]+/){2}diff(?:stat|)(?:/[^/\s"]+){2}:[0-9a-f]+
# bitbucket repositories commits
\bapi\.bitbucket\.org/\d+\.\d+/repositories/(?:[^/\s"]+/){2}commits?/[0-9a-f]+
# bitbucket commits
\bbitbucket\.org/(?:[^/\s"]+/){2}commits?/[0-9a-f]+
# bit.ly
\bbit\.ly/\w+
# bitrise
\bapp\.bitrise\.io/app/[0-9a-f]*/[\w.?=&]*
# bootstrapcdn.com
\bbootstrapcdn\.com/[-./\w]+
# cdn.cloudflare.com
\bcdnjs\.cloudflare\.com/[./\w]+
# circleci
\bcircleci\.com/gh(?:/[^/\s"]+){1,5}.[a-z]+\?[-0-9a-zA-Z=&]+
# gitter
\bgitter\.im(?:/[^/\s"]+){2}\?at=[0-9a-f]+
# gravatar
\bgravatar\.com/avatar/[0-9a-f]+
# ibm
[a-z.]*ibm\.com/[-_#=:%!?~.\\/\d\w]*
# imgur
\bimgur\.com/[^.]+
# Internet Archive
\barchive\.org/web/\d+/(?:[-\w.?,'/\\+&%$#_:]*)
# discord
/discord(?:app\.com|\.gg)/(?:invite/)?[a-zA-Z0-9]{7,}
# Disqus
\bdisqus\.com/[-\w/%.()!?&=_]*
# medium link
\blink\.medium\.com/[a-zA-Z0-9]+
# medium
\bmedium\.com/\@?[^/\s"]+/[-\w]+
# microsoft
\b(?:https?://|)(?:(?:download\.visualstudio|docs|msdn2?|research)\.microsoft|blogs\.msdn)\.com/[-_a-zA-Z0-9()=./%]*
# powerbi
\bapp\.powerbi\.com/reportEmbed/[^"' ]*
# vs devops
\bvisualstudio.com(?::443|)/[-\w/?=%&.]*
# microsoft store
\bmicrosoft\.com/store/apps/\w+
# mvnrepository.com
\bmvnrepository\.com/[-0-9a-z./]+
# now.sh
/[0-9a-z-.]+\.now\.sh\b
# oracle
\bdocs\.oracle\.com/[-0-9a-zA-Z./_?#&=]*
# chromatic.com
/\S+.chromatic.com\S*[")]
# codacy
\bapi\.codacy\.com/project/badge/Grade/[0-9a-f]+
# compai
\bcompai\.pub/v1/png/[0-9a-f]+
# mailgun api
\.api\.mailgun\.net/v3/domains/[0-9a-z]+\.mailgun.org/messages/[0-9a-zA-Z=@]*
# mailgun
\b[0-9a-z]+.mailgun.org
# /message-id/
/message-id/[-\w@./%]+
# Reddit
\breddit\.com/r/[/\w_]*
# requestb.in
\brequestb\.in/[0-9a-z]+
# sched
\b[a-z0-9]+\.sched\.com\b
# Slack url
slack://[a-zA-Z0-9?&=]+
# Slack
\bslack\.com/[-0-9a-zA-Z/_~?&=.]*
# Slack edge
\bslack-edge\.com/[-a-zA-Z0-9?&=%./]+
# Slack images
\bslack-imgs\.com/[-a-zA-Z0-9?&=%.]+
# shields.io
\bshields\.io/[-\w/%?=&.:+;,]*
# stackexchange -- https://stackexchange.com/feeds/sites
\b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/(?:questions/\w+/[-\w]+|a/)
# Sentry
[0-9a-f]{32}\@o\d+\.ingest\.sentry\.io\b
# Twitter markdown
\[\@[^[/\]:]*?\]\(https://twitter.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)\)
# Twitter hashtag
\btwitter\.com/hashtag/[\w?_=&]*
# Twitter status
\btwitter\.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)
# Twitter profile images
\btwimg\.com/profile_images/[_\w./]*
# Twitter media
\btwimg\.com/media/[-_\w./?=]*
# Twitter link shortened
\bt\.co/\w+
# facebook
\bfburl\.com/[0-9a-z_]+
# facebook CDN
\bfbcdn\.net/[\w/.,]*
# facebook watch
\bfb\.watch/[0-9A-Za-z]+
# dropbox
\bdropbox\.com/sh?/[^/\s"]+/[-0-9A-Za-z_.%?=&;]+
# ipfs protocol
ipfs://[0-9a-z]*
# ipfs url
/ipfs/[0-9a-z]*
# w3
\bw3\.org/[-0-9a-zA-Z/#.]+
# loom
\bloom\.com/embed/[0-9a-f]+
# regex101
\bregex101\.com/r/[^/\s"]+/\d+
# figma
\bfigma\.com/file(?:/[0-9a-zA-Z]+/)+
# freecodecamp.org
\bfreecodecamp\.org/[-\w/.]+
# image.tmdb.org
\bimage\.tmdb\.org/[/\w.]+
# mermaid
\bmermaid\.ink/img/[-\w]+|\bmermaid-js\.github\.io/mermaid-live-editor/#/edit/[-\w]+
# Wikipedia
\ben\.wikipedia\.org/wiki/[-\w%.#]+
# gitweb
[^"\s]+/gitweb/\S+;h=[0-9a-f]+
# HyperKitty lists
/archives/list/[^@/]+\@[^/\s"]*/message/[^/\s"]*/
# lists
/thread\.html/[^"\s]+
# list-management
\blist-manage\.com/subscribe(?:[?&](?:u|id)=[0-9a-f]+)+
# kubectl.kubernetes.io/last-applied-configuration
"kubectl.kubernetes.io/last-applied-configuration": ".*"
# pgp
\bgnupg\.net/pks/lookup[?&=0-9a-zA-Z]*
# Spotify
\bopen\.spotify\.com/embed/playlist/\w+
# Mastodon
\bmastodon\.[-a-z.]*/(?:media/|\@)[?&=0-9a-zA-Z_]*
# scastie
\bscastie\.scala-lang\.org/[^/]+/\w+
# images.unsplash.com
\bimages\.unsplash\.com/(?:(?:flagged|reserve)/|)[-\w./%?=%&.;]+
# pastebin
\bpastebin\.com/[\w/]+
# heroku
\b\w+\.heroku\.com/source/archive/\w+
# quip
\b\w+\.quip\.com/\w+(?:(?:#|/issues/)\w+)?
# badgen.net
\bbadgen\.net/badge/[^")\]'\s]+
# statuspage.io
\w+\.statuspage\.io\b
# media.giphy.com
\bmedia\.giphy\.com/media/[^/]+/[\w.?&=]+
# tinyurl
\btinyurl\.com/\w+
# getopts
\bgetopts\s+(?:"[^"]+"|'[^']+')
# ANSI color codes
(?:\\(?:u00|x)1b|\x1b)\[\d+(?:;\d+|)m
# URL escaped characters
\%[0-9A-F][A-F]
# IPv6
\b(?:[0-9a-fA-F]{0,4}:){3,7}[0-9a-fA-F]{0,4}\b
# c99 hex digits (not the full format, just one I've seen)
0x[0-9a-fA-F](?:\.[0-9a-fA-F]*|)[pP]
# Punycode
\bxn--[-0-9a-z]+
# sha
sha\d+:[0-9]*[a-f]{3,}[0-9a-f]*
# sha-... -- uses a fancy capture
(['"]|&quot;)[0-9a-f]{40,}\g{-1}
# hex runs
\b[0-9a-fA-F]{16,}\b
# hex in url queries
=[0-9a-fA-F]*?(?:[A-F]{3,}|[a-f]{3,})[0-9a-fA-F]*?&
# ssh
(?:ssh-\S+|-nistp256) [-a-zA-Z=;:/0-9+]{12,}
# PGP
\b(?:[0-9A-F]{4} ){9}[0-9A-F]{4}\b
# GPG keys
\b(?:[0-9A-F]{4} ){5}(?: [0-9A-F]{4}){5}\b
# Well known gpg keys
.well-known/openpgpkey/[\w./]+
# uuid:
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|u\d+)\b
# integrity
integrity="sha\d+-[-a-zA-Z=;:/0-9+]{40,}"
# https://www.gnu.org/software/groff/manual/groff.html
# man troff content
\\f[BCIPR]
# '
\\\(aq
# .desktop mime types
^MimeTypes?=.*$
# .desktop localized entries
^[A-Z][a-z]+\[[a-z]+\]=.*$
# Localized .desktop content
Name\[[^\]]+\]=.*
# IServiceProvider
\bI(?=(?:[A-Z][a-z]{2,})+\b)
# crypt
"\$2[ayb]\$.{56}"
# scrypt / argon
\$(?:scrypt|argon\d+[di]*)\$\S+
# Input to GitHub JSON
content: "[-a-zA-Z=;:/0-9+]*="
# Python stringprefix / binaryprefix
# Note that there's a high false positive rate, remove the `?=` and search for the regex to see if the matches seem like reasonable strings
(?<!')\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)'(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})
# Regular expressions for (P|p)assword
\([A-Z]\|[a-z]\)[a-z]+
# JavaScript regular expressions
# javascript test regex
/.*/[gim]*\.test\(
# javascript match regex
\.match\(/[^/\s"]*/[gim]*\s*
# javascript match regex
\.match\(/\\[b].*?/[gim]*\s*\)(?:;|$)
# javascript regex
^\s*/\\[b].*/[gim]*\s*(?:\)(?:;|$)|,$)
# javascript replace regex
\.replace\(/[^/\s"]*/[gim]*\s*,
# Go regular expressions
regexp?\.MustCompile\(`[^`]*`\)
# sed regular expressions
sed 's/(?:[^/]*?[a-zA-Z]{3,}[^/]*?/){2}
# go install
go install(?:\s+[a-z]+\.[-@\w/.]+)+
# kubernetes pod status lists
# https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
\w+(?:-\w+)+\s+\d+/\d+\s+(?:Running|Pending|Succeeded|Failed|Unknown)\s+
# kubectl - pods in CrashLoopBackOff
\w+-[0-9a-f]+-\w+\s+\d+/\d+\s+CrashLoopBackOff\s+
# kubernetes object suffix
-[0-9a-f]{10}-\w{5}\s
# posthog secrets
posthog\.init\((['"])phc_[^"',]+\g{-1},
# xcode
# xcodeproject scenes
(?:Controller|ID|id)="\w{3}-\w{2}-\w{3}"
# xcode api botches
customObjectInstantitationMethod
# font awesome classes
\.fa-[-a-z0-9]+
# Update Lorem based on your content (requires `ge` and `w` from https://github.com/jsoref/spelling; and `review` from https://github.com/check-spelling/check-spelling/wiki/Looking-for-items-locally )
# grep '^[^#].*lorem' .github/actions/spelling/patterns.txt|perl -pne 's/.*i..\?://;s/\).*//' |tr '|' "\n"|sort -f |xargs -n1 ge|perl -pne 's/^[^:]*://'|sort -u|w|sed -e 's/ .*//'|w|review -
# Warning, while `(?i)` is very neat and fancy, if you have some binary files that aren't proper unicode, you might run into:
## Operation "substitution (s///)" returns its argument for non-Unicode code point 0x1C19AE (the code point will vary).
## You could manually change `(?i)X...` to use `[Xx]...`
## or you could add the files to your `excludes` file (a version after 0.0.19 should identify the file path)
# Lorem
(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus)\b(?:\w|\s|[,.])*
# Non-English
[a-zA-Z]*[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*
# French
# This corpus only had capital letters, but you probably want lowercase ones as well.
\b[LN]'+[a-z]{2,}\b
# latex
\\(?:n(?:ew|ormal|osub)|r(?:enew)|t(?:able(?:of|)|he|itle))(?=[a-z]+)
# the negative lookahead here is to allow catching 'templatesz' as a misspelling
# but to otherwise recognize a Windows path with \templates\foo.template or similar:
\\(?:necessary|r(?:eport|esolve[dr]?|esult)|t(?:arget|emplates?))(?![a-z])
# ignore long runs of a single character:
\b([A-Za-z])\g{-1}{3,}\b
# Note that the next example is no longer necessary if you are using
# to match a string starting with a `#`, use a character-class:
[#]backwards
# version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
# Compiler flags (Scala)
(?:^|[\t ,>"'`=(])-J-[DPWXY](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
# Compiler flags
#(?:^|[\t ,"'`=(])-[DPWXYLlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
# Compiler flags (linker)
,-B
# curl arguments
\b(?:\\n|)curl(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*
# set arguments
\bset(?:\s+-[abefimouxE]{1,2})*\s+-[abefimouxE]{3,}(?:\s+-[abefimouxE]+)*
# tar arguments
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
# tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long...
\btput\s+(?:(?:-[SV]|-T\s*\w+)\s+)*\w{3,5}\b
# macOS temp folders
/var/folders/\w\w/[+\w]+/(?:T|-Caches-)/

117
.github/actions/spelling/excludes.txt vendored Normal file
View File

@@ -0,0 +1,117 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
(?:(?i)\.png$)
(?:^|/)(?i)COPYRIGHT
(?:^|/)(?i)LICEN[CS]E
(?:^|/)3rdparty/
(?:^|/)dirs$
(?:^|/)go\.mod$
(?:^|/)go\.sum$
(?:^|/)package(?:-lock|)\.json$
(?:^|/)sources(?:|\.dep)$
(?:^|/)vendor/
\.a$
\.ai$
\.avi$
\.bmp$
\.bz2$
\.cer$
\.class$
\.crl$
\.crt$
\.csr$
\.dll$
\.docx?$
\.drawio$
\.DS_Store$
\.eot$
\.eps$
\.exe$
\.gif$
\.gitattributes$
\.graffle$
\.gz$
\.icns$
\.ico$
\.jar$
\.jks$
\.jpeg$
\.jpg$
\.key$
\.lib$
\.lock$
\.map$
\.min\..
\.mod$
\.mp3$
\.mp4$
\.o$
\.ocf$
\.otf$
\.pbxproj$
\.pdf$
\.pem$
\.png$
\.psd$
\.pyc$
\.runsettings$
\.s$
\.sig$
\.so$
\.svg$
\.svgz$
\.svgz?$
\.tar$
\.tgz$
\.tiff?$
\.ttf$
\.vsdx$
\.wav$
\.webm$
\.webp$
\.woff
\.woff2?$
\.xcf$
\.xls
\.xlsx?$
\.xpm$
\.yml$
\.zip$
^\.github/actions/spelling/
^\.github/fabricbot.json$
^\.gitignore$
^\Q.git-blame-ignore-revs\E$
^\Q.github/workflows/spelling.yml\E$
^\Qdoc/reference/windows-terminal-logo.ans\E$
^\Qsamples/ConPTY/EchoCon/EchoCon/EchoCon.vcxproj.filters\E$
^\Qsrc/host/exe/Host.EXE.vcxproj.filters\E$
^\Qsrc/host/ft_host/chafa.txt\E$
^\Qsrc/tools/closetest/CloseTest.vcxproj.filters\E$
^\XamlStyler.json$
^build/config/
^consolegit2gitfilters\.json$
^dep/
^doc/reference/master-sequence-list.csv$
^doc/reference/UTF8-torture-test\.txt$
^oss/
^src/host/ft_uia/run\.bat$
^src/host/runft\.bat$
^src/host/runut\.bat$
^src/interactivity/onecore/BgfxEngine\.
^src/renderer/atlas/
^src/renderer/wddmcon/WddmConRenderer\.
^src/terminal/adapter/ut_adapter/run\.bat$
^src/terminal/parser/delfuzzpayload\.bat$
^src/terminal/parser/ft_fuzzer/run\.bat$
^src/terminal/parser/ft_fuzzer/VTCommandFuzzer\.cpp$
^src/terminal/parser/ft_fuzzwrapper/run\.bat$
^src/terminal/parser/ut_parser/Base64Test.cpp$
^src/terminal/parser/ut_parser/run\.bat$
^src/tools/integrity/packageuwp/ConsoleUWP\.appxSources$
^src/tools/lnkd/lnkd\.bat$
^src/tools/pixels/pixels\.bat$
^src/tools/texttests/fira\.txt$
^src/tools/U8U16Test/(?:fr|ru|zh)\.txt$
^src/types/ut_types/UtilsTests.cpp$
^tools/ReleaseEngineering/ServicingPipeline.ps1$
ignore$
SUMS$

View File

@@ -1,16 +1,23 @@
AAAa
AAAAA
AAAAAAAAAAAAA
AAAAAABBBBBBCCC
AAAAABBBBBBCCC
abcd
abcd
abcde
abcdef
ABCDEFG
ABCDEFGH
ABCDEFGHIJ
abcdefghijk
ABCDEFGHIJKLMNO
abcdefghijklmnop
ABCDEFGHIJKLMNOPQRST
abcdefghijklmnopqrstuvwxyz
ABCG
ABE
abf
BBBBB
BBBBBBBB
BBBBBCCC
BBBBCCCCC
BBGGRR
BBBBBBBBBBBBBBDDDD
EFG
EFGh
QQQQQQQQQQABCDEFGHIJ
@@ -19,7 +26,6 @@ QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQQ
QQQQQQQQQQABCDEFGHIJPQRSTQQQQQQQQQQ
qrstuvwxyz
qwerty
QWERTYUIOP
qwertyuiopasdfg
YYYYYYYDDDDDDDDDDD
ZAAZZ
@@ -31,3 +37,4 @@ ZYXWVUT
ZZBBZ
ZZZBB
ZZZBZ
ZZZZZ

View File

@@ -0,0 +1,6 @@
WCAG
winui
appshellintegration
mdtauk
gfycat
Guake

View File

@@ -0,0 +1,62 @@
# reject `m_data` as there's a certain OS which has evil defines that break things if it's used elsewhere
# \bm_data\b
# If you have a framework that uses `it()` for testing and `fit()` for debugging a specific test,
# you might not want to check in code where you were debugging w/ `fit()`, in which case, you might want
# to use this:
#\bfit\(
# s.b. GitHub
\bGithub\b
# s.b. GitLab
\bGitlab\b
# s.b. JavaScript
\bJavascript\b
# s.b. Microsoft
\bMicroSoft\b
# s.b. another
\ban[- ]other\b
# s.b. greater than
\bgreater then\b
# s.b. into
#\sin to\s
# s.b. opt-in
\sopt in\s
# s.b. less than
\bless then\b
# s.b. otherwise
\bother[- ]wise\b
# s.b. nonexistent
\bnon existing\b
\b[Nn]o[nt][- ]existent\b
# s.b. preexisting
[Pp]re[- ]existing
# s.b. preempt
[Pp]re[- ]empt\b
# s.b. preemptively
[Pp]re[- ]emptively
# s.b. reentrancy
[Rr]e[- ]entrancy
# s.b. reentrant
[Rr]e[- ]entrant
# s.b. workaround(s)
#\bwork[- ]arounds?\b
# Reject duplicate words
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s

View File

@@ -0,0 +1,96 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
https?://\S+
[Pp]ublicKeyToken="?[0-9a-fA-F]{16}"?
(?:[{"]|UniqueIdentifier>)[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}(?:[}"]|</UniqueIdentifier)
(?:0[Xx]|\\x|U\+|#)[a-f0-9A-FGgRr]{2,}[Uu]?[Ll]{0,2}\b
microsoft/cascadia-code\@[0-9a-fA-F]{40}
\d+x\d+Logo
Scro\&ll
# selectionInput.cpp
:\\windows\\syste\b
TestUtils::VerifyExpectedString\(tb, L"[^"]+"
(?:hostSm|mach)\.ProcessString\(L"[^"]+"
\b([A-Za-z])\g{-1}{3,}\b
0x[0-9A-Za-z]+
Base64::s_(?:En|De)code\(L"[^"]+"
VERIFY_ARE_EQUAL\(L"[^"]+"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+/"
std::memory_order_[\w]+
D2DERR_SHADER_COMPILE_FAILED
TIL_FEATURE_[0-9A-Z_]+
vcvars\w*
ROY\sG\.\sBIV
!(?:(?i)ESC)!\[
!(?:(?i)CSI)!(?:\d+(?:;\d+|)m|[ABCDF])
# Python stringprefix / binaryprefix
\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)'
# Automatically suggested patterns
# hit-count: 3831 file-count: 582
# IServiceProvider
\bI(?=(?:[A-Z][a-z]{2,})+\b)
# hit-count: 71 file-count: 35
# Compiler flags
(?:^|[\t ,"'`=(])-[D](?=[A-Z]{2,}|[A-Z][a-z])
(?:^|[\t ,"'`=(])-[X](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
# hit-count: 41 file-count: 28
# version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
# hit-count: 20 file-count: 9
# hex runs
\b[0-9a-fA-F]{16,}\b
# hit-count: 10 file-count: 7
# uuid:
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
# hit-count: 4 file-count: 4
# mailto urls
mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,}
# hit-count: 4 file-count: 1
# ANSI color codes
(?:\\(?:u00|x)1b|\x1b)\[\d+(?:;\d+|)m
# hit-count: 2 file-count: 1
# latex
\\(?:n(?:ew|ormal|osub)|r(?:enew)|t(?:able(?:of|)|he|itle))(?=[a-z]+)
# hit-count: 1 file-count: 1
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|u\d+)\b
# hit-count: 1 file-count: 1
# Non-English
[a-zA-Z]*[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*
# hit-count: 1 file-count: 1
# French
# This corpus only had capital letters, but you probably want lowercase ones as well.
\b[LN]'+[a-z]{2,}\b
# acceptable duplicates
# ls directory listings
[-bcdlpsw](?:[-r][-w][-sx]){3}\s+\d+\s+(\S+)\s+\g{-1}\s+\d+\s+
# C/idl types + English ...
\s(Guid|long|LONG|that) \g{-1}\s
# javadoc / .net
(?:[\\@](?:groupname|param)|(?:public|private)(?:\s+static|\s+readonly)*)\s+(\w+)\s+\g{-1}\s
# Commit message -- Signed-off-by and friends
^\s*(?:(?:Based-on-patch|Co-authored|Helped|Mentored|Reported|Reviewed|Signed-off)-by|Thanks-to): (?:[^<]*<[^>]*>|[^<]*)\s*$
# Autogenerated revert commit message
^This reverts commit [0-9a-f]{40}\.$
# vtmode
--vtmode\s+(\w+)\s+\g{-1}\s
# ignore long runs of a single character:
\b([A-Za-z])\g{-1}{3,}\b

12
.github/actions/spelling/reject.txt vendored Normal file
View File

@@ -0,0 +1,12 @@
^attache$
^attacher$
^attachers$
benefitting
occurences?
^dependan.*
^oer$
Sorce
^[Ss]pae.*
^untill$
^untilling$
^wether.*

View File

@@ -1,20 +0,0 @@
name: Spell checking
on:
push:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '15 * * * *'
jobs:
build:
name: Spell checking
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
with:
fetch-depth: 5
- uses: check-spelling/check-spelling@0.0.16-alpha
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
bucket: .github/actions
project: spell-check

134
.github/workflows/spelling2.yml vendored Normal file
View File

@@ -0,0 +1,134 @@
# spelling.yml is blocked per https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p
name: Spell checking
# Comment management is handled through a secondary job, for details see:
# https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions
#
# `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment
# (in odd cases, it might actually run just to collapse a commment, but that's fairly rare)
# it needs `contents: write` in order to add a comment.
#
# `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment
# or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment)
# it needs `pull-requests: write` in order to manipulate those comments.
# Updating pull request branches is managed via comment handling.
# For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list
#
# These elements work together to make it happen:
#
# `on.issue_comment`
# This event listens to comments by users asking to update the metadata.
#
# `jobs.update`
# This job runs in response to an issue_comment and will push a new commit
# to update the spelling metadata.
#
# `with.experimental_apply_changes_via_bot`
# Tells the action to support and generate messages that enable it
# to make a commit to update the spelling metadata.
#
# `with.ssh_key`
# In order to trigger workflows when the commit is made, you can provide a
# secret (typically, a write-enabled github deploy key).
#
# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key
on:
push:
branches:
- "**"
tags-ignore:
- "**"
pull_request_target:
branches:
- "**"
tags-ignore:
- "**"
types:
- 'opened'
- 'reopened'
- 'synchronize'
issue_comment:
types:
- 'created'
jobs:
spelling:
name: Spell checking
permissions:
contents: read
pull-requests: read
actions: read
outputs:
followup: ${{ steps.spelling.outputs.followup }}
runs-on: ubuntu-latest
if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'"
concurrency:
group: spelling-${{ github.event.pull_request.number || github.ref }}
# note: If you use only_check_changed_files, you do not want cancel-in-progress
cancel-in-progress: true
steps:
- name: check-spelling
id: spelling
uses: check-spelling/check-spelling@v0.0.21
with:
suppress_push_for_open_pull_request: 1
checkout: true
check_file_names: 1
spell_check_this: check-spelling/spell-check-this@prerelease
post_comment: 0
use_magic_file: 1
extra_dictionary_limit: 10
extra_dictionaries:
cspell:software-terms/src/software-terms.txt
cspell:python/src/python/python-lib.txt
cspell:node/node.txt
cspell:cpp/src/stdlib-c.txt
cspell:cpp/src/stdlib-cpp.txt
cspell:fullstack/fullstack.txt
cspell:filetypes/filetypes.txt
cspell:html/html.txt
cspell:cpp/src/compiler-msvc.txt
cspell:python/src/common/extra.txt
cspell:powershell/powershell.txt
cspell:aws/aws.txt
cspell:cpp/src/lang-keywords.txt
cspell:npm/npm.txt
cspell:dotnet/dotnet.txt
cspell:python/src/python/python.txt
cspell:css/css.txt
cspell:cpp/src/stdlib-cmath.txt
check_extra_dictionaries: ''
comment-push:
name: Report (Push)
# If your workflow isn't running on push, you can remove this job
runs-on: ubuntu-latest
needs: spelling
permissions:
contents: write
if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push'
steps:
- name: comment
uses: check-spelling/check-spelling@v0.0.21
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@prerelease
task: ${{ needs.spelling.outputs.followup }}
comment-pr:
name: Report (PR)
# If you workflow isn't running on pull_request*, you can remove this job
runs-on: ubuntu-latest
needs: spelling
permissions:
pull-requests: write
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
steps:
- name: comment
uses: check-spelling/check-spelling@v0.0.21
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@prerelease
task: ${{ needs.spelling.outputs.followup }}

View File

@@ -389,7 +389,8 @@ Global
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.AuditMode|x64.ActiveCfg = Release|x64
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.AuditMode|x64.ActiveCfg = AuditMode|x64
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.AuditMode|x64.Build.0 = AuditMode|x64
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.AuditMode|x86.ActiveCfg = Release|Win32
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|Any CPU.ActiveCfg = Debug|Win32
{9CBD7DFA-1754-4A9D-93D7-857A9D17CB1B}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -413,7 +414,8 @@ Global
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC}.AuditMode|x64.ActiveCfg = Release|x64
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC}.AuditMode|x64.ActiveCfg = AuditMode|x64
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC}.AuditMode|x64.Build.0 = AuditMode|x64
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC}.AuditMode|x86.ActiveCfg = Release|Win32
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC}.Debug|Any CPU.ActiveCfg = Debug|Win32
{345FD5A4-B32B-4F29-BD1C-B033BD2C35CC}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -437,7 +439,8 @@ Global
{2FD12FBB-1DDB-46D8-B818-1023C624CACA}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{2FD12FBB-1DDB-46D8-B818-1023C624CACA}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{2FD12FBB-1DDB-46D8-B818-1023C624CACA}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{2FD12FBB-1DDB-46D8-B818-1023C624CACA}.AuditMode|x64.ActiveCfg = Release|x64
{2FD12FBB-1DDB-46D8-B818-1023C624CACA}.AuditMode|x64.ActiveCfg = AuditMode|x64
{2FD12FBB-1DDB-46D8-B818-1023C624CACA}.AuditMode|x64.Build.0 = AuditMode|x64
{2FD12FBB-1DDB-46D8-B818-1023C624CACA}.AuditMode|x86.ActiveCfg = Release|Win32
{2FD12FBB-1DDB-46D8-B818-1023C624CACA}.Debug|Any CPU.ActiveCfg = Debug|Win32
{2FD12FBB-1DDB-46D8-B818-1023C624CACA}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -573,7 +576,8 @@ Global
{1C959542-BAC2-4E55-9A6D-13251914CBB9}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{1C959542-BAC2-4E55-9A6D-13251914CBB9}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{1C959542-BAC2-4E55-9A6D-13251914CBB9}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{1C959542-BAC2-4E55-9A6D-13251914CBB9}.AuditMode|x64.ActiveCfg = Release|x64
{1C959542-BAC2-4E55-9A6D-13251914CBB9}.AuditMode|x64.ActiveCfg = AuditMode|x64
{1C959542-BAC2-4E55-9A6D-13251914CBB9}.AuditMode|x64.Build.0 = AuditMode|x64
{1C959542-BAC2-4E55-9A6D-13251914CBB9}.AuditMode|x86.ActiveCfg = Release|Win32
{1C959542-BAC2-4E55-9A6D-13251914CBB9}.Debug|Any CPU.ActiveCfg = Debug|Win32
{1C959542-BAC2-4E55-9A6D-13251914CBB9}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -597,7 +601,8 @@ Global
{06EC74CB-9A12-429C-B551-8562EC954746}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{06EC74CB-9A12-429C-B551-8562EC954746}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{06EC74CB-9A12-429C-B551-8562EC954746}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{06EC74CB-9A12-429C-B551-8562EC954746}.AuditMode|x64.ActiveCfg = Release|x64
{06EC74CB-9A12-429C-B551-8562EC954746}.AuditMode|x64.ActiveCfg = AuditMode|x64
{06EC74CB-9A12-429C-B551-8562EC954746}.AuditMode|x64.Build.0 = AuditMode|x64
{06EC74CB-9A12-429C-B551-8562EC954746}.AuditMode|x86.ActiveCfg = Release|Win32
{06EC74CB-9A12-429C-B551-8562EC954746}.Debug|Any CPU.ActiveCfg = Debug|Win32
{06EC74CB-9A12-429C-B551-8562EC954746}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -811,7 +816,8 @@ Global
{5D23E8E1-3C64-4CC1-A8F7-6861677F7239}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{5D23E8E1-3C64-4CC1-A8F7-6861677F7239}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{5D23E8E1-3C64-4CC1-A8F7-6861677F7239}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{5D23E8E1-3C64-4CC1-A8F7-6861677F7239}.AuditMode|x64.ActiveCfg = Release|x64
{5D23E8E1-3C64-4CC1-A8F7-6861677F7239}.AuditMode|x64.ActiveCfg = AuditMode|x64
{5D23E8E1-3C64-4CC1-A8F7-6861677F7239}.AuditMode|x64.Build.0 = AuditMode|x64
{5D23E8E1-3C64-4CC1-A8F7-6861677F7239}.AuditMode|x86.ActiveCfg = Release|Win32
{5D23E8E1-3C64-4CC1-A8F7-6861677F7239}.Debug|Any CPU.ActiveCfg = Debug|Win32
{5D23E8E1-3C64-4CC1-A8F7-6861677F7239}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -835,7 +841,8 @@ Global
{18D09A24-8240-42D6-8CB6-236EEE820262}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{18D09A24-8240-42D6-8CB6-236EEE820262}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{18D09A24-8240-42D6-8CB6-236EEE820262}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{18D09A24-8240-42D6-8CB6-236EEE820262}.AuditMode|x64.ActiveCfg = Release|x64
{18D09A24-8240-42D6-8CB6-236EEE820262}.AuditMode|x64.ActiveCfg = AuditMode|x64
{18D09A24-8240-42D6-8CB6-236EEE820262}.AuditMode|x64.Build.0 = AuditMode|x64
{18D09A24-8240-42D6-8CB6-236EEE820262}.AuditMode|x86.ActiveCfg = Release|Win32
{18D09A24-8240-42D6-8CB6-236EEE820262}.Debug|Any CPU.ActiveCfg = Debug|Win32
{18D09A24-8240-42D6-8CB6-236EEE820262}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -975,7 +982,8 @@ Global
{06EC74CB-9A12-429C-B551-8532EC964726}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{06EC74CB-9A12-429C-B551-8532EC964726}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{06EC74CB-9A12-429C-B551-8532EC964726}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{06EC74CB-9A12-429C-B551-8532EC964726}.AuditMode|x64.ActiveCfg = Release|x64
{06EC74CB-9A12-429C-B551-8532EC964726}.AuditMode|x64.ActiveCfg = AuditMode|x64
{06EC74CB-9A12-429C-B551-8532EC964726}.AuditMode|x64.Build.0 = AuditMode|x64
{06EC74CB-9A12-429C-B551-8532EC964726}.AuditMode|x86.ActiveCfg = Release|Win32
{06EC74CB-9A12-429C-B551-8532EC964726}.Debug|Any CPU.ActiveCfg = Debug|Win32
{06EC74CB-9A12-429C-B551-8532EC964726}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -999,7 +1007,8 @@ Global
{ED82003F-FC5D-4E94-8B47-F480018ED064}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{ED82003F-FC5D-4E94-8B47-F480018ED064}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{ED82003F-FC5D-4E94-8B47-F480018ED064}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{ED82003F-FC5D-4E94-8B47-F480018ED064}.AuditMode|x64.ActiveCfg = Release|x64
{ED82003F-FC5D-4E94-8B47-F480018ED064}.AuditMode|x64.ActiveCfg = AuditMode|x64
{ED82003F-FC5D-4E94-8B47-F480018ED064}.AuditMode|x64.Build.0 = AuditMode|x64
{ED82003F-FC5D-4E94-8B47-F480018ED064}.AuditMode|x86.ActiveCfg = Release|Win32
{ED82003F-FC5D-4E94-8B47-F480018ED064}.Debug|Any CPU.ActiveCfg = Debug|Win32
{ED82003F-FC5D-4E94-8B47-F480018ED064}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -1023,7 +1032,8 @@ Global
{06EC74CB-9A12-429C-B551-8562EC964846}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{06EC74CB-9A12-429C-B551-8562EC964846}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{06EC74CB-9A12-429C-B551-8562EC964846}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{06EC74CB-9A12-429C-B551-8562EC964846}.AuditMode|x64.ActiveCfg = Release|x64
{06EC74CB-9A12-429C-B551-8562EC964846}.AuditMode|x64.ActiveCfg = AuditMode|x64
{06EC74CB-9A12-429C-B551-8562EC964846}.AuditMode|x64.Build.0 = AuditMode|x64
{06EC74CB-9A12-429C-B551-8562EC964846}.AuditMode|x86.ActiveCfg = Release|Win32
{06EC74CB-9A12-429C-B551-8562EC964846}.Debug|Any CPU.ActiveCfg = Debug|Win32
{06EC74CB-9A12-429C-B551-8562EC964846}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -1095,7 +1105,8 @@ Global
{990F2657-8580-4828-943F-5DD657D11842}.AuditMode|ARM64.ActiveCfg = Release|ARM64
{990F2657-8580-4828-943F-5DD657D11842}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{990F2657-8580-4828-943F-5DD657D11842}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{990F2657-8580-4828-943F-5DD657D11842}.AuditMode|x64.ActiveCfg = Release|x64
{990F2657-8580-4828-943F-5DD657D11842}.AuditMode|x64.ActiveCfg = AuditMode|x64
{990F2657-8580-4828-943F-5DD657D11842}.AuditMode|x64.Build.0 = AuditMode|x64
{990F2657-8580-4828-943F-5DD657D11842}.AuditMode|x86.ActiveCfg = Release|Win32
{990F2657-8580-4828-943F-5DD657D11842}.Debug|Any CPU.ActiveCfg = Debug|Win32
{990F2657-8580-4828-943F-5DD657D11842}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -1751,7 +1762,8 @@ Global
{A22EC5F6-7851-4B88-AC52-47249D437A52}.AuditMode|ARM64.Build.0 = AuditMode|ARM64
{A22EC5F6-7851-4B88-AC52-47249D437A52}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
{A22EC5F6-7851-4B88-AC52-47249D437A52}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
{A22EC5F6-7851-4B88-AC52-47249D437A52}.AuditMode|x64.ActiveCfg = Release|x64
{A22EC5F6-7851-4B88-AC52-47249D437A52}.AuditMode|x64.ActiveCfg = AuditMode|x64
{A22EC5F6-7851-4B88-AC52-47249D437A52}.AuditMode|x64.Build.0 = AuditMode|x64
{A22EC5F6-7851-4B88-AC52-47249D437A52}.AuditMode|x86.ActiveCfg = AuditMode|Win32
{A22EC5F6-7851-4B88-AC52-47249D437A52}.AuditMode|x86.Build.0 = AuditMode|Win32
{A22EC5F6-7851-4B88-AC52-47249D437A52}.Debug|Any CPU.ActiveCfg = Debug|Win32

View File

@@ -26,7 +26,7 @@ Revision History:
class ATTR_ROW final
{
public:
using const_iterator = typename AttrRowIterator;
using const_iterator = AttrRowIterator;
ATTR_ROW(const UINT cchRowWidth, const TextAttribute attr);

View File

@@ -47,11 +47,11 @@ enum class DelimiterClass
class CharRow final
{
public:
using glyph_type = typename wchar_t;
using value_type = typename CharRowCell;
using glyph_type = wchar_t;
using value_type = CharRowCell;
using iterator = typename std::vector<value_type>::iterator;
using const_iterator = typename std::vector<value_type>::const_iterator;
using reference = typename CharRowCellReference;
using reference = CharRowCellReference;
CharRow(size_t rowWidth, ROW* const pParent);

View File

@@ -29,7 +29,7 @@ OutputCellView::OutputCellView(const std::wstring_view view,
// - Reference to UTF-16 character data
// C26445 - suppressed to enable the `TextBufferTextIterator::operator->` method which needs a non-temporary memory location holding the wstring_view.
// TODO: GH 2681 - remove this suppression by reconciling the probably bad design of the iterators that leads to this being required.
[[gsl::suppress(26445)]] const std::wstring_view& OutputCellView::Chars() const noexcept
GSL_SUPPRESS(26445) const std::wstring_view& OutputCellView::Chars() const noexcept
{
return _view;
}

View File

@@ -44,8 +44,8 @@ namespace std
class UnicodeStorage final
{
public:
using key_type = typename COORD;
using mapped_type = typename std::vector<wchar_t>;
using key_type = COORD;
using mapped_type = std::vector<wchar_t>;
UnicodeStorage() noexcept;

View File

@@ -28,7 +28,6 @@ Cursor::Cursor(const ULONG ulSize, TextBuffer& parentBuffer) noexcept :
_fHaveDeferredCursorRedraw(false),
_ulSize(ulSize),
_cursorType(CursorType::Legacy),
_fUseColor(false),
_color(s_InvertCursorColor)
{
}

View File

@@ -116,6 +116,5 @@ private:
void _RedrawCursorAlways() noexcept;
CursorType _cursorType;
bool _fUseColor;
COLORREF _color;
};

View File

@@ -326,7 +326,7 @@ std::vector<std::vector<wchar_t>> Search::s_CreateNeedleFromString(const std::ws
{
const auto charData = Utf16Parser::Parse(wstr);
std::vector<std::vector<wchar_t>> cells;
for (const auto chars : charData)
for (const auto& chars : charData)
{
if (IsGlyphFullWidth(std::wstring_view{ chars.data(), chars.size() }))
{

View File

@@ -26,7 +26,7 @@ TextBufferTextIterator::TextBufferTextIterator(const TextBufferCellIterator& cel
// Return Value:
// - Read only UTF-16 text data
// TODO GH 2682, fix design so this doesn't have to be suppressed.
[[gsl::suppress(26434)]] const std::wstring_view TextBufferTextIterator::operator*() const noexcept
GSL_SUPPRESS(26434) const std::wstring_view TextBufferTextIterator::operator*() const noexcept
{
return _view.Chars();
}
@@ -36,7 +36,7 @@ TextBufferTextIterator::TextBufferTextIterator(const TextBufferCellIterator& cel
// Return Value:
// - Read only UTF-16 text data
// TODO GH 2682, fix design so this doesn't have to be suppressed.
[[gsl::suppress(26434)]] const std::wstring_view* TextBufferTextIterator::operator->() const noexcept
GSL_SUPPRESS(26434) const std::wstring_view* TextBufferTextIterator::operator->() const noexcept
{
return &_view.Chars();
}

View File

@@ -6,12 +6,12 @@
<!-- We're controlling the output paths manually; do not let the rest of VS override them. -->
<GenerateProjectSpecificOutputFolder>false</GenerateProjectSpecificOutputFolder>
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)-Clang\</OutDir>
<!-- C++/WinRT projects get their own project-specific output directories. -->
<OutDir Condition="'$(OpenConsoleCppWinRTProject)'=='true'">$(SolutionDir)bin\$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(OpenConsoleCppWinRTProject)'=='true'">$(SolutionDir)bin\$(Platform)\$(Configuration)-Clang\$(ProjectName)\</OutDir>
<OutputPath>$(OutDir)</OutputPath>
<IntDir>$(SolutionDir)obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
<IntDir>$(SolutionDir)obj\$(Platform)\$(Configuration)-Clang\$(ProjectName)\</IntDir>
<IntermediateOutputPath>$(IntDir)</IntermediateOutputPath>
<!-- Both pairs of OutDir/OutputPath and IntDir/IntermediateOutputPath must be set;
@@ -20,7 +20,7 @@
<PropertyGroup>
<!-- This one is always set so that non-redirected projects can depend on it. -->
<OpenConsoleCommonOutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)\</OpenConsoleCommonOutDir>
<OpenConsoleCommonOutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)-Clang\</OpenConsoleCommonOutDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -70,7 +70,8 @@
<!-- For ALL build types-->
<PropertyGroup Label="Configuration">
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>ClangCl</PlatformToolset>
<LLVMInstallDir>C:\Program Files\LLVM</LLVMInstallDir>
<CharacterSet>Unicode</CharacterSet>
<LinkIncremental>false</LinkIncremental>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
@@ -95,7 +96,7 @@
<MinimalRebuild>false</MinimalRebuild>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/utf-8 -Wno-error=uninitialized-const-reference -Wno-error=int-to-void-pointer-cast -Wno-error=pointer-to-int-cast -Wno-error=defaulted-function-deleted -Wno-error=overloaded-virtual -Wno-error=sign-compare -Wno-error=microsoft-goto -Wno-error=unknown-pragmas -Wno-error=microsoft-sealed -Wno-error=inconsistent-missing-override -Wno-error=extra-tokens -Wno-error=missing-field-initializers -Wno-error=unused-variable -Wno-error=ignored-qualifiers -Wno-error=c++11-narrowing -Wno-error=pragma-pack -Wno-error=nonportable-include-path -Wno-error=microsoft-include -Wno-error=reorder-ctor -Wno-error=unused-parameter -Wno-error=microsoft-exception-spec -Wno-error=missing-braces -Wno-error=switch %(AdditionalOptions)</AdditionalOptions>
<ControlFlowGuard>Guard</ControlFlowGuard>
</ClCompile>
<ResourceCompile>
@@ -127,6 +128,9 @@
<!-- For Release ONLY -->
<PropertyGroup Condition="'$(Configuration)'=='Release' Or '$(Configuration)'=='AuditMode'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
@@ -159,6 +163,12 @@
<CAExcludePath>$(CAExcludePath);$(SolutionDir)\dep;$(SolutionDir)\oss;$(SolutionDir)\packages</CAExcludePath>
<OpenConsoleVcpkgConfiguration>Release</OpenConsoleVcpkgConfiguration>
<OpenConsoleTppVcpkgConfiguration>Release</OpenConsoleTppVcpkgConfiguration>
<EnableClangTidyCodeAnalysis>true</EnableClangTidyCodeAnalysis>
<!--<ClangTidyHeaderFilter>\\(dep|oss|packages)\\</ClangTidyHeaderFilter>-->
<ClangTidyChecks>bugprone-*,modernize-*</ClangTidyChecks>
<ClangTidyToolPath>$(SolutionDir)</ClangTidyToolPath>
<ClangTidyToolExe>clang-tidy-wrapper.cmd</ClangTidyToolExe>
<ClangTidyAdditionalOptions>--header-filter=\\(dep|oss|packages)\\ --export-fixes=$(IntDir)\$(ProjectName).CTFixes.yaml</ClangTidyAdditionalOptions>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='AuditMode'">
<ClCompile>

View File

@@ -2,6 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PlatformToolset>ClangCl</PlatformToolset>
<!-- this will trigger the use of a project-specific out dir -->
<OpenConsoleCppWinRTProject>true</OpenConsoleCppWinRTProject>
</PropertyGroup>

View File

@@ -1145,6 +1145,7 @@ std::wstring Alias::s_MatchAndCopyAlias(const std::wstring& sourceText,
const std::wstring& exeName,
size_t& lineCount)
{
const auto f = [](){wchar_t* x{nullptr}; ::wmemchr(x, L'3', 0);};
// Copy source text into a local for manipulation.
std::wstring sourceCopy(sourceText);

View File

@@ -51,7 +51,7 @@ Popup::Popup(SCREEN_INFORMATION& screenInfo, const COORD proposedSize) :
TargetRect.Bottom = _region.Bottom;
// copy the data into the backup buffer
_oldContents = std::move(screenInfo.ReadRect(Viewport::FromInclusive(TargetRect)));
_oldContents = screenInfo.ReadRect(Viewport::FromInclusive(TargetRect));
CONSOLE_INFORMATION& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
const auto countWas = gci.PopupCount.fetch_add(1ui16);

View File

@@ -65,7 +65,9 @@ Abstract:
#include <winmeta.h>
TRACELOGGING_DECLARE_PROVIDER(g_hConhostV2EventTraceProvider);
#include <telemetry\ProjectTelemetry.h>
#if 0
#include <TraceLoggingActivity.h>
#endif
#include "telemetry.hpp"
#include "tracing.hpp"
@@ -88,8 +90,4 @@ TRACELOGGING_DECLARE_PROVIDER(g_hConhostV2EventTraceProvider);
#include "..\inc\operators.hpp"
#include "..\inc\conattrs.hpp"
// TODO: MSFT 9355094 Find a better way of doing this. http://osgvsowi/9355094
[[nodiscard]] inline NTSTATUS NTSTATUS_FROM_HRESULT(HRESULT hr)
{
return NTSTATUS_FROM_WIN32(HRESULT_CODE(hr));
}
#define NTSTATUS_FROM_HRESULT(...) ((NTSTATUS)(NTSTATUS_FROM_WIN32(HRESULT_CODE((__VA_ARGS__)))))

View File

@@ -56,7 +56,7 @@ Telemetry::Telemetry() :
{
time(&_tStartedAt);
TraceLoggingRegister(g_hConhostV2EventTraceProvider);
TraceLoggingWriteStart(_activity, "ActivityStart");
//TraceLoggingWriteStart(_activity, "ActivityStart");
// initialize wil tracelogging
wil::SetResultLoggingCallback(&Tracing::TraceFailure);
}
@@ -64,7 +64,7 @@ Telemetry::Telemetry() :
Telemetry::~Telemetry()
{
TraceLoggingWriteStop(_activity, "ActivityStop");
//TraceLoggingWriteStop(_activity, "ActivityStop");
TraceLoggingUnregister(g_hConhostV2EventTraceProvider);
}
@@ -198,6 +198,7 @@ void Telemetry::FindDialogClosed()
// clang-format off
#pragma prefast(suppress: __WARNING_NONCONST_LOCAL, "Activity can't be const, since it's set to a random value on startup.")
// clang-format on
#if 0
TraceLoggingWriteTagged(_activity,
"FindDialogUsed",
TraceLoggingValue(_fpFindStringLengthAverage, "StringLengthAverage"),
@@ -206,6 +207,7 @@ void Telemetry::FindDialogClosed()
TraceLoggingValue(_uiFindNextClickedTotal, "FindNextButtonClickedTotal"),
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
#endif
// Get ready for the next time the dialog is used.
_fpFindStringLengthAverage = 0;
@@ -361,7 +363,7 @@ void Telemetry::WriteFinalTraceLog()
{
// Normally we would set the activity Id earlier, but since we know the parser only sends
// one final log at the end, setting the activity this late should be fine.
Microsoft::Console::VirtualTerminal::TermTelemetry::Instance().SetActivityId(_activity.Id());
//Microsoft::Console::VirtualTerminal::TermTelemetry::Instance().SetActivityId(_activity.Id());
Microsoft::Console::VirtualTerminal::TermTelemetry::Instance().SetShouldWriteFinalLog(_fUserInteractiveForTelemetry);
if (_fUserInteractiveForTelemetry)
@@ -374,6 +376,7 @@ void Telemetry::WriteFinalTraceLog()
// clang-format off
#pragma prefast(suppress: __WARNING_NONCONST_LOCAL, "Activity can't be const, since it's set to a random value on startup.")
// clang-format on
#if 0
TraceLoggingWriteTagged(_activity,
"SessionEnding",
TraceLoggingBool(_fBashUsed, "BashUsed"),
@@ -559,6 +562,7 @@ void Telemetry::WriteFinalTraceLog()
break;
}
}
#endif
}
}
}
@@ -582,8 +586,10 @@ void Telemetry::LogRipMessage(_In_z_ const char* pszMessage, ...) const
// clang-format off
#pragma prefast(suppress: __WARNING_NONCONST_LOCAL, "Activity can't be const, since it's set to a random value on startup.")
// clang-format on
#if 0
TraceLoggingWriteTagged(_activity,
"RipMessage",
TraceLoggingString(szMessageEvaluated, "Message"));
#endif
}
}

View File

@@ -16,7 +16,6 @@ Author(s):
--*/
#pragma once
#include <TraceLoggingActivity.h>
class Telemetry
{
@@ -135,7 +134,7 @@ private:
static const int c_iMaxProcessesConnected = 100;
TraceLoggingActivity<g_hConhostV2EventTraceProvider> _activity;
//TraceLoggingActivity<g_hConhostV2EventTraceProvider> _activity;
float _fpFindStringLengthAverage;
float _fpDirectionDownAverage;

View File

@@ -11,6 +11,12 @@
using Microsoft::Console::Interactivity::ServiceLocator;
static UINT s_LoadStringEx(_In_ HINSTANCE hModule,
_In_ UINT wID,
_Out_writes_(cchBufferMax) LPWSTR lpBuffer,
_In_ UINT cchBufferMax,
_In_ WORD wLangId);
short CalcWindowSizeX(const SMALL_RECT& rect) noexcept
{
return rect.Right - rect.Left + 1;

View File

@@ -28,11 +28,6 @@ short CalcCursorYOffsetInPixels(const short sFontSizeY, const ULONG ulSize) noex
WORD ConvertStringToDec(_In_ PCWSTR pwchToConvert, _Out_opt_ PCWSTR* const ppwchEnd) noexcept;
std::wstring _LoadString(const UINT id);
static UINT s_LoadStringEx(_In_ HINSTANCE hModule,
_In_ UINT wID,
_Out_writes_(cchBufferMax) LPWSTR lpBuffer,
_In_ UINT cchBufferMax,
_In_ WORD wLangId);
class Utils
{

View File

@@ -23,7 +23,6 @@ typedef NTSTATUS *PNTSTATUS;
// End From ntdef.h
#define INLINE_NTSTATUS_FROM_WIN32 1 // Must use inline NTSTATUS or it will call the wrapped function twice.
#pragma warning(push)
#pragma warning(disable:4430) // Must disable 4430 "default int" warning for C++ because ntstatus.h is inflexible SDK definition.
#include <ntstatus.h>

View File

@@ -27,6 +27,6 @@ namespace Microsoft::Console
[[nodiscard]] virtual HRESULT WriteTerminalW(const std::wstring_view wstr) = 0;
};
inline Microsoft::Console::ITerminalOutputConnection::~ITerminalOutputConnection() {}
inline Microsoft::Console::ITerminalOutputConnection::~ITerminalOutputConnection() = default;
#pragma warning(pop)
}

View File

@@ -49,8 +49,8 @@
#include <regex>
// WIL
#include <wil/Common.h>
#include <wil/Result.h>
#include <wil/common.h>
#include <wil/result.h>
#include <wil/resource.h>
#include <wil/wistd_memory.h>
#include <wil/stl.h>
@@ -66,7 +66,7 @@
#include <gsl/span_ext>
// CppCoreCheck
#include <CppCoreCheck/Warnings.h>
#include <CppCoreCheck/warnings.h>
// Chromium Numerics (safe math)
#pragma warning(push)

View File

@@ -14,11 +14,11 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
class _bitmap_const_iterator
{
public:
using iterator_category = typename std::input_iterator_tag;
using value_type = typename const til::rectangle;
using difference_type = typename ptrdiff_t;
using pointer = typename const til::rectangle*;
using reference = typename const til::rectangle&;
using iterator_category = std::input_iterator_tag;
using value_type = const til::rectangle;
using difference_type = ptrdiff_t;
using pointer = const til::rectangle*;
using reference = const til::rectangle&;
_bitmap_const_iterator(const dynamic_bitset<>& values, til::rectangle rc, ptrdiff_t pos) :
_values(values),

View File

@@ -31,18 +31,15 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ // Clang, GCC
uint8_t a, b, g, r;
#else
uint8_t r, g, b, a;
uint8_t r{ 0 }, g{ 0 }, b{ 0 }, a{ 0 };
#endif
};
uint32_t abgr;
};
#pragma warning(pop)
constexpr color() noexcept :
r{ 0 },
g{ 0 },
b{ 0 },
a{ 0 }
constexpr color() noexcept
{
}
@@ -124,7 +121,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
{
}
constexpr color with_alpha(uint8_t alpha) const
[[nodiscard]] constexpr color with_alpha(uint8_t alpha) const
{
return color{
r,
@@ -168,13 +165,13 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return !(*this == other);
}
std::wstring to_string() const
[[nodiscard]] std::wstring to_string() const
{
std::wstringstream wss;
wss << L"Color " << ToHexString(false);
return wss.str();
}
std::wstring ToHexString(const bool omitAlpha = false) const
[[nodiscard]] std::wstring ToHexString(const bool omitAlpha = false) const
{
std::wstringstream wss;
wss << L"#" << std::uppercase << std::setfill(L'0') << std::hex;

View File

@@ -262,7 +262,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return point{ x, y };
}
constexpr ptrdiff_t x() const noexcept
[[nodiscard]] constexpr ptrdiff_t x() const noexcept
{
return _x;
}
@@ -275,7 +275,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ret;
}
constexpr ptrdiff_t y() const noexcept
[[nodiscard]] constexpr ptrdiff_t y() const noexcept
{
return _y;
}
@@ -325,7 +325,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
}
#endif
std::wstring to_string() const
[[nodiscard]] std::wstring to_string() const
{
return wil::str_printf<std::wstring>(L"(X:%td, Y:%td)", x(), y());
}

View File

@@ -208,12 +208,12 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
_topLeft.y() < _bottomRight.y();
}
constexpr const_iterator begin() const
[[nodiscard]] constexpr const_iterator begin() const
{
return const_iterator(_topLeft, _bottomRight);
}
constexpr const_iterator end() const
[[nodiscard]] constexpr const_iterator end() const
{
// For the standard walk: Left-To-Right then Top-To-Bottom
// the end box is one cell below the left most column.
@@ -650,7 +650,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
// scale_up will scale the entire rectangle up by the size factor
// This includes moving the origin.
rectangle scale_up(const size& size) const
[[nodiscard]] rectangle scale_up(const size& size) const
{
const auto topLeft = _topLeft * size;
const auto bottomRight = _bottomRight * size;
@@ -660,7 +660,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
// scale_down will scale the entire rectangle down by the size factor,
// but rounds the bottom-right corner out.
// This includes moving the origin.
rectangle scale_down(const size& size) const
[[nodiscard]] rectangle scale_down(const size& size) const
{
auto topLeft = _topLeft;
auto bottomRight = _bottomRight;
@@ -682,7 +682,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
#pragma endregion
constexpr ptrdiff_t top() const noexcept
[[nodiscard]] constexpr ptrdiff_t top() const noexcept
{
return _topLeft.y();
}
@@ -695,7 +695,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ret;
}
constexpr ptrdiff_t bottom() const noexcept
[[nodiscard]] constexpr ptrdiff_t bottom() const noexcept
{
return _bottomRight.y();
}
@@ -708,7 +708,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ret;
}
constexpr ptrdiff_t left() const noexcept
[[nodiscard]] constexpr ptrdiff_t left() const noexcept
{
return _topLeft.x();
}
@@ -721,7 +721,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ret;
}
constexpr ptrdiff_t right() const noexcept
[[nodiscard]] constexpr ptrdiff_t right() const noexcept
{
return _bottomRight.x();
}
@@ -734,7 +734,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ret;
}
ptrdiff_t width() const
[[nodiscard]] ptrdiff_t width() const
{
ptrdiff_t ret;
THROW_HR_IF(E_ABORT, !::base::CheckSub(right(), left()).AssignIfValid(&ret));
@@ -749,7 +749,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ret;
}
ptrdiff_t height() const
[[nodiscard]] ptrdiff_t height() const
{
ptrdiff_t ret;
THROW_HR_IF(E_ABORT, !::base::CheckSub(bottom(), top()).AssignIfValid(&ret));
@@ -764,33 +764,33 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ret;
}
constexpr point origin() const noexcept
[[nodiscard]] constexpr point origin() const noexcept
{
return _topLeft;
}
size size() const
[[nodiscard]] size size() const
{
return til::size{ width(), height() };
}
constexpr bool empty() const noexcept
[[nodiscard]] constexpr bool empty() const noexcept
{
return !operator bool();
}
constexpr bool contains(til::point pt) const
[[nodiscard]] constexpr bool contains(til::point pt) const
{
return pt.x() >= _topLeft.x() && pt.x() < _bottomRight.x() &&
pt.y() >= _topLeft.y() && pt.y() < _bottomRight.y();
}
bool contains(ptrdiff_t index) const
[[nodiscard]] bool contains(ptrdiff_t index) const
{
return index >= 0 && index < size().area();
}
constexpr bool contains(til::rectangle rc) const
[[nodiscard]] constexpr bool contains(til::rectangle rc) const
{
// Union the other rectangle and ourselves.
// If the result of that didn't grow at all, then we already
@@ -798,7 +798,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return (*this | rc) == *this;
}
ptrdiff_t index_of(til::point pt) const
[[nodiscard]] ptrdiff_t index_of(til::point pt) const
{
THROW_HR_IF(E_INVALIDARG, !contains(pt));
@@ -818,7 +818,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return result;
}
til::point point_at(ptrdiff_t index) const
[[nodiscard]] til::point point_at(ptrdiff_t index) const
{
THROW_HR_IF(E_INVALIDARG, !contains(index));
@@ -875,7 +875,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
}
#endif
std::wstring to_string() const
[[nodiscard]] std::wstring to_string() const
{
return wil::str_printf<std::wstring>(L"(L:%td, T:%td, R:%td, B:%td) [W:%td, H:%td]", left(), top(), right(), bottom(), width(), height());
}

View File

@@ -170,7 +170,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return size{ width, height };
}
size divide_ceil(const size& other) const
[[nodiscard]] size divide_ceil(const size& other) const
{
// Divide normally to get the floor.
const size floor = *this / other;
@@ -217,7 +217,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return floor + size{ adjWidth, adjHeight };
}
constexpr ptrdiff_t width() const noexcept
[[nodiscard]] constexpr ptrdiff_t width() const noexcept
{
return _width;
}
@@ -230,7 +230,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ret;
}
constexpr ptrdiff_t height() const noexcept
[[nodiscard]] constexpr ptrdiff_t height() const noexcept
{
return _height;
}
@@ -243,7 +243,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return ret;
}
ptrdiff_t area() const
[[nodiscard]] ptrdiff_t area() const
{
ptrdiff_t result;
THROW_HR_IF(E_ABORT, !base::CheckMul(_width, _height).AssignIfValid(&result));
@@ -285,7 +285,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
}
#endif
std::wstring to_string() const
[[nodiscard]] std::wstring to_string() const
{
return wil::str_printf<std::wstring>(L"[W:%td, H:%td]", width(), height());
}

View File

@@ -11,8 +11,8 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
class some
{
private:
std::array<T, N> _array;
size_t _used;
std::array<T, N> _array{};
size_t _used{ 0 };
#ifdef UNIT_TESTING
friend class SomeTests;
@@ -33,9 +33,8 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
using reverse_iterator = typename decltype(_array)::reverse_iterator;
using const_reverse_iterator = typename decltype(_array)::const_reverse_iterator;
some() noexcept :
_array{},
_used{ 0 }
some() noexcept
{
}
@@ -72,57 +71,57 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
std::swap(_used, _Other._used);
}
constexpr const_iterator begin() const noexcept
[[nodiscard]] constexpr const_iterator begin() const noexcept
{
return _array.begin();
}
constexpr const_iterator end() const noexcept
[[nodiscard]] constexpr const_iterator end() const noexcept
{
return _array.begin() + _used;
}
constexpr const_reverse_iterator rbegin() const noexcept
[[nodiscard]] constexpr const_reverse_iterator rbegin() const noexcept
{
return const_reverse_iterator(end());
}
constexpr const_reverse_iterator rend() const noexcept
[[nodiscard]] constexpr const_reverse_iterator rend() const noexcept
{
return const_reverse_iterator(begin());
}
constexpr const_iterator cbegin() const noexcept
[[nodiscard]] constexpr const_iterator cbegin() const noexcept
{
return begin();
}
constexpr const_iterator cend() const noexcept
[[nodiscard]] constexpr const_iterator cend() const noexcept
{
return end();
}
constexpr const_reverse_iterator crbegin() const noexcept
[[nodiscard]] constexpr const_reverse_iterator crbegin() const noexcept
{
return rbegin();
}
constexpr const_reverse_iterator crend() const noexcept
[[nodiscard]] constexpr const_reverse_iterator crend() const noexcept
{
return rend();
}
constexpr size_type size() const noexcept
[[nodiscard]] constexpr size_type size() const noexcept
{
return _used;
}
constexpr size_type max_size() const noexcept
[[nodiscard]] constexpr size_type max_size() const noexcept
{
return N;
}
constexpr bool empty() const noexcept
[[nodiscard]] constexpr bool empty() const noexcept
{
return !_used;
}
@@ -133,7 +132,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
_array = {}; // should free members, if necessary.
}
constexpr const_reference at(size_type pos) const
[[nodiscard]] constexpr const_reference at(size_type pos) const
{
if (_used <= pos)
{
@@ -148,17 +147,17 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return _array[pos];
}
constexpr const_reference front() const noexcept
[[nodiscard]] constexpr const_reference front() const noexcept
{
return _array[0];
}
constexpr const_reference back() const noexcept
[[nodiscard]] constexpr const_reference back() const noexcept
{
return _array[_used - 1];
}
constexpr const T* data() const noexcept
[[nodiscard]] constexpr const T* data() const noexcept
{
return _array.data();
}
@@ -209,7 +208,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
throw std::out_of_range("invalid some<T, N> subscript");
}
std::wstring to_string() const
[[nodiscard]] std::wstring to_string() const
{
std::wstringstream wss;
wss << std::endl

View File

@@ -97,7 +97,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
public:
template<typename... Args>
constexpr explicit presorted_static_map(const Args&... args) noexcept :
static_map{ args... } {};
static_map<K, V, Compare, N, details::presorted_input_t>{ args... } {};
};
// this is a deduction guide that ensures two things:

View File

@@ -249,8 +249,8 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
};
// make clear what incoming string type the state is for
typedef u8u16state<char> u8state;
typedef u8u16state<wchar_t> u16state;
using u8state = u8u16state<char>;
using u16state = u8u16state<wchar_t>;
// Routine Description:
// - Takes a UTF-8 string and performs the conversion to UTF-16. NOTE: The function relies on getting complete UTF-8 characters at the string boundaries.

View File

@@ -17,7 +17,6 @@ typedef NTSTATUS* PNTSTATUS;
/*lint -restore */ // Resume checking for different typedefs.
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
#define INLINE_NTSTATUS_FROM_WIN32 1 // Must use inline NTSTATUS or it will call the wrapped function twice.
#pragma warning(push)
#pragma warning(disable : 4430) // Must disable 4430 "default int" warning for C++ because ntstatus.h is inflexible SDK definition.
#include <ntstatus.h>

View File

@@ -42,7 +42,7 @@ namespace Microsoft::Console::Render
// IDWriteTextAnalysisSource methods
[[nodiscard]] HRESULT STDMETHODCALLTYPE GetTextAtPosition(UINT32 textPosition,
_Outptr_result_buffer_(*textLength) WCHAR const** textString,
_Out_ UINT32* textLength) override;
_Out_ UINT32* textLength) noexcept override;
[[nodiscard]] HRESULT STDMETHODCALLTYPE GetTextBeforePosition(UINT32 textPosition,
_Outptr_result_buffer_(*textLength) WCHAR const** textString,
_Out_ UINT32* textLength) noexcept override;
@@ -57,17 +57,17 @@ namespace Microsoft::Console::Render
// IDWriteTextAnalysisSink methods
[[nodiscard]] HRESULT STDMETHODCALLTYPE SetScriptAnalysis(UINT32 textPosition,
UINT32 textLength,
_In_ DWRITE_SCRIPT_ANALYSIS const* scriptAnalysis) override;
_In_ DWRITE_SCRIPT_ANALYSIS const* scriptAnalysis) noexcept override;
[[nodiscard]] HRESULT STDMETHODCALLTYPE SetLineBreakpoints(UINT32 textPosition,
UINT32 textLength,
_In_reads_(textLength) DWRITE_LINE_BREAKPOINT const* lineBreakpoints) override;
_In_reads_(textLength) DWRITE_LINE_BREAKPOINT const* lineBreakpoints) noexcept override;
[[nodiscard]] HRESULT STDMETHODCALLTYPE SetBidiLevel(UINT32 textPosition,
UINT32 textLength,
UINT8 explicitLevel,
UINT8 resolvedLevel) override;
UINT8 resolvedLevel) noexcept override;
[[nodiscard]] HRESULT STDMETHODCALLTYPE SetNumberSubstitution(UINT32 textPosition,
UINT32 textLength,
_In_ IDWriteNumberSubstitution* numberSubstitution) override;
_In_ IDWriteNumberSubstitution* numberSubstitution) noexcept override;
[[nodiscard]] static HRESULT STDMETHODCALLTYPE s_CalculateBoxEffect(IDWriteTextFormat* format, size_t widthPixels, IDWriteFontFace1* face, float fontScale, IBoxDrawingEffect** effect) noexcept;

View File

@@ -73,7 +73,7 @@ using namespace Microsoft::Console::Render;
RETURN_HR_IF_NULL(E_INVALIDARG, drawingContext);
// Retrieve as D2D1 matrix then copy into DWRITE matrix.
D2D1_MATRIX_3X2_F d2d1Matrix{ 0 };
D2D1_MATRIX_3X2_F d2d1Matrix{ {0} };
drawingContext->renderTarget->GetTransform(&d2d1Matrix);
transform->dx = d2d1Matrix.dx;
@@ -297,34 +297,29 @@ try
switch (options.cursorType)
{
case CursorType::Legacy:
{
case CursorType::Legacy: {
// Enforce min/max cursor height
ULONG ulHeight = std::clamp(options.ulCursorHeightPercent, MinCursorHeightPercent, MaxCursorHeightPercent);
ulHeight = (glyphSize.height<ULONG>() * ulHeight) / 100;
rect.top = rect.bottom - ulHeight;
break;
}
case CursorType::VerticalBar:
{
case CursorType::VerticalBar: {
// It can't be wider than one cell or we'll have problems in invalidation, so restrict here.
// It's either the left + the proposed width from the ease of access setting, or
// it's the right edge of the block cursor as a maximum.
rect.right = std::min(rect.right, rect.left + options.cursorPixelWidth);
break;
}
case CursorType::Underscore:
{
case CursorType::Underscore: {
rect.top = rect.bottom - 1;
break;
}
case CursorType::EmptyBox:
{
case CursorType::EmptyBox: {
paintType = CursorPaintType::Outline;
break;
}
case CursorType::FullBox:
{
case CursorType::FullBox: {
break;
}
default:
@@ -342,13 +337,11 @@ try
switch (paintType)
{
case CursorPaintType::Fill:
{
case CursorPaintType::Fill: {
d2dContext->FillRectangle(rect, brush.Get());
break;
}
case CursorPaintType::Outline:
{
case CursorPaintType::Outline: {
// DrawRectangle in straddles physical pixels in an attempt to draw a line
// between them. To avoid this, bump the rectangle around by half the stroke width.
rect.top += 0.5f;
@@ -392,7 +385,8 @@ CATCH_RETURN()
DWRITE_MEASURING_MODE measuringMode,
const DWRITE_GLYPH_RUN* glyphRun,
const DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription,
IUnknown* clientDrawingEffect)
IUnknown* clientDrawingEffect) noexcept
try
{
// Color glyph rendering sourced from https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DWriteColorGlyph
@@ -572,8 +566,7 @@ CATCH_RETURN()
case DWRITE_GLYPH_IMAGE_FORMATS_PNG:
case DWRITE_GLYPH_IMAGE_FORMATS_JPEG:
case DWRITE_GLYPH_IMAGE_FORMATS_TIFF:
case DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8:
{
case DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8: {
// This run is bitmap glyphs. Use Direct2D to draw them.
d2dContext4->DrawColorBitmapGlyphRun(colorRun->glyphImageFormat,
currentBaselineOrigin,
@@ -582,8 +575,7 @@ CATCH_RETURN()
}
break;
case DWRITE_GLYPH_IMAGE_FORMATS_SVG:
{
case DWRITE_GLYPH_IMAGE_FORMATS_SVG: {
// This run is SVG glyphs. Use Direct2D to draw them.
d2dContext4->DrawSvgGlyphRun(currentBaselineOrigin,
&colorRun->glyphRun,
@@ -655,6 +647,7 @@ CATCH_RETURN()
return S_OK;
}
CATCH_RETURN()
#pragma endregion
[[nodiscard]] HRESULT CustomTextRenderer::EndClip(void* clientDrawingContext) noexcept

View File

@@ -7,7 +7,7 @@
#include "CustomTextLayout.h"
#include "../../interactivity/win32/CustomWindowMessages.h"
#include "../../types/inc/Viewport.hpp"
#include "../../types/inc/viewport.hpp"
#include "../../inc/unicode.hpp"
#include "../../inc/DefaultSettings.h"
#include <VersionHelpers.h>

View File

@@ -18,14 +18,14 @@ RenderTracing::RenderTracing()
{
#ifndef UNIT_TESTING
TraceLoggingRegister(g_hConsoleVtRendererTraceProvider);
#endif UNIT_TESTING
#endif
}
RenderTracing::~RenderTracing()
{
#ifndef UNIT_TESTING
TraceLoggingUnregister(g_hConsoleVtRendererTraceProvider);
#endif UNIT_TESTING
#endif
}
// Function Description:
@@ -78,7 +78,7 @@ void RenderTracing::TraceString(const std::string_view& instr) const
}
#else
UNREFERENCED_PARAMETER(instr);
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceInvalidate(const til::rectangle invalidRect) const
@@ -95,7 +95,7 @@ void RenderTracing::TraceInvalidate(const til::rectangle invalidRect) const
}
#else
UNREFERENCED_PARAMETER(invalidRect);
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceInvalidateAll(const til::rectangle viewport) const
@@ -112,7 +112,7 @@ void RenderTracing::TraceInvalidateAll(const til::rectangle viewport) const
}
#else
UNREFERENCED_PARAMETER(viewport);
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceTriggerCircling(const bool newFrame) const
@@ -124,7 +124,7 @@ void RenderTracing::TraceTriggerCircling(const bool newFrame) const
TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
#else
UNREFERENCED_PARAMETER(newFrame);
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceInvalidateScroll(const til::point scroll) const
@@ -191,7 +191,7 @@ void RenderTracing::TraceStartPaint(const bool quickReturn,
UNREFERENCED_PARAMETER(scrollDelt);
UNREFERENCED_PARAMETER(cursorMoved);
UNREFERENCED_PARAMETER(wrappedRow);
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceEndPaint() const
@@ -201,7 +201,7 @@ void RenderTracing::TraceEndPaint() const
"VtEngine_TraceEndPaint",
TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
#else
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceLastText(const til::point lastTextPos) const
@@ -218,7 +218,7 @@ void RenderTracing::TraceLastText(const til::point lastTextPos) const
}
#else
UNREFERENCED_PARAMETER(lastTextPos);
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceScrollFrame(const til::point scrollDeltaPos) const
@@ -235,7 +235,7 @@ void RenderTracing::TraceScrollFrame(const til::point scrollDeltaPos) const
}
#else
UNREFERENCED_PARAMETER(scrollDeltaPos);
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceMoveCursor(const til::point lastTextPos, const til::point cursor) const
@@ -258,7 +258,7 @@ void RenderTracing::TraceMoveCursor(const til::point lastTextPos, const til::poi
#else
UNREFERENCED_PARAMETER(lastTextPos);
UNREFERENCED_PARAMETER(cursor);
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceWrapped() const
@@ -273,7 +273,7 @@ void RenderTracing::TraceWrapped() const
TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
}
#else
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceSetWrapped(const short wrappedRow) const
@@ -288,7 +288,7 @@ void RenderTracing::TraceSetWrapped(const short wrappedRow) const
}
#else
UNREFERENCED_PARAMETER(wrappedRow);
#endif UNIT_TESTING
#endif
}
void RenderTracing::TraceClearWrapped() const
@@ -303,7 +303,7 @@ void RenderTracing::TraceClearWrapped() const
TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
}
#else
#endif UNIT_TESTING
#endif
}
void RenderTracing::TracePaintCursor(const til::point coordCursor) const
@@ -320,5 +320,5 @@ void RenderTracing::TracePaintCursor(const til::point coordCursor) const
}
#else
UNREFERENCED_PARAMETER(coordCursor);
#endif UNIT_TESTING
#endif
}

View File

@@ -29,7 +29,7 @@ namespace Microsoft::Console::VirtualTerminal
return SubSequence(offset)._value & 0xFF;
}
constexpr VTID SubSequence(const size_t offset) const
[[nodiscard]] constexpr VTID SubSequence(const size_t offset) const
{
return _value >> (CHAR_BIT * offset);
}
@@ -93,8 +93,8 @@ namespace Microsoft::Console::VirtualTerminal
class VTParameter
{
public:
constexpr VTParameter() noexcept :
_value{ -1 }
constexpr VTParameter() noexcept
{
}
@@ -103,18 +103,18 @@ namespace Microsoft::Console::VirtualTerminal
{
}
constexpr bool has_value() const noexcept
[[nodiscard]] constexpr bool has_value() const noexcept
{
// A negative value indicates that the parameter was omitted.
return _value >= 0;
}
constexpr size_t value() const noexcept
[[nodiscard]] constexpr size_t value() const noexcept
{
return _value;
}
constexpr size_t value_or(size_t defaultValue) const noexcept
[[nodiscard]] constexpr size_t value_or(size_t defaultValue) const noexcept
{
return has_value() ? _value : defaultValue;
}
@@ -133,47 +133,46 @@ namespace Microsoft::Console::VirtualTerminal
}
private:
std::make_signed<size_t>::type _value;
std::make_signed<size_t>::type _value{ -1 };
};
class VTParameters
{
public:
constexpr VTParameters() noexcept
{
}
= default;
constexpr VTParameters(const VTParameter* ptr, const size_t count) noexcept :
_values{ ptr, count }
{
}
constexpr VTParameter at(const size_t index) const noexcept
[[nodiscard]] constexpr VTParameter at(const size_t index) const noexcept
{
// If the index is out of range, we return a parameter with no value.
return index < _values.size() ? _values[index] : VTParameter{};
}
constexpr bool empty() const noexcept
[[nodiscard]] constexpr bool empty() const noexcept
{
return _values.empty();
}
constexpr size_t size() const noexcept
[[nodiscard]] constexpr size_t size() const noexcept
{
// We always return a size of at least 1, since an empty parameter
// list is the equivalent of a single "default" parameter.
return std::max<size_t>(_values.size(), 1);
}
VTParameters subspan(const size_t offset) const noexcept
[[nodiscard]] VTParameters subspan(const size_t offset) const noexcept
{
const auto subValues = _values.subspan(offset);
return { subValues.data(), subValues.size() };
}
template<typename T>
bool for_each(const T&& predicate) const
[[nodiscard]] [[nodiscard]] [[nodiscard]] [[nodiscard]] [[nodiscard]] bool for_each(const T&& predicate) const
{
// We always return at least 1 value here, since an empty parameter
// list is the equivalent of a single "default" parameter.

View File

@@ -41,6 +41,6 @@ namespace Microsoft::Console::VirtualTerminal
virtual bool MoveCursor(const size_t row,
const size_t col) = 0;
virtual bool IsVtInputEnabled() const = 0;
[[nodiscard]] virtual bool IsVtInputEnabled() const = 0;
};
}

View File

@@ -123,5 +123,5 @@ public:
virtual bool AddHyperlink(const std::wstring_view uri, const std::wstring_view params) = 0;
virtual bool EndHyperlink() = 0;
};
inline Microsoft::Console::VirtualTerminal::ITermDispatch::~ITermDispatch() {}
inline Microsoft::Console::VirtualTerminal::ITermDispatch::~ITermDispatch() = default;
#pragma warning(pop)

View File

@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include <precomp.h>
#include "precomp.h"
#include "adaptDispatch.hpp"
#include "conGetSet.hpp"

View File

@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include <precomp.h>
#include "precomp.h"
#include "telemetry.hpp"

View File

@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include <precomp.h>
#include "precomp.h"
#include <windows.h>
#include "charsets.hpp"
#include "terminalOutput.hpp"

View File

@@ -47,14 +47,14 @@ namespace Microsoft::Console::VirtualTerminal
virtual bool ActionSs3Dispatch(const wchar_t wch, const VTParameters parameters) = 0;
virtual bool ParseControlSequenceAfterSs3() const = 0;
virtual bool FlushAtEndOfString() const = 0;
virtual bool DispatchControlCharsFromEscape() const = 0;
virtual bool DispatchIntermediatesFromEscape() const = 0;
[[nodiscard]] virtual bool ParseControlSequenceAfterSs3() const = 0;
[[nodiscard]] virtual bool FlushAtEndOfString() const = 0;
[[nodiscard]] virtual bool DispatchControlCharsFromEscape() const = 0;
[[nodiscard]] virtual bool DispatchIntermediatesFromEscape() const = 0;
protected:
IStateMachineEngine() = default;
};
inline IStateMachineEngine::~IStateMachineEngine() {}
inline IStateMachineEngine::~IStateMachineEngine() = default;
}

View File

@@ -311,7 +311,7 @@ bool InputStateMachineEngine::ActionEscDispatch(const VTID id)
bool success = false;
// There are no intermediates, so the id is effectively the final char.
const wchar_t wch = gsl::narrow_cast<wchar_t>(id);
const auto wch = gsl::narrow_cast<wchar_t>(id);
// 0x7f is DEL, which we treat effectively the same as a ctrl character.
if (wch == 0x7f)
@@ -694,7 +694,7 @@ bool InputStateMachineEngine::_WriteSingleKey(const wchar_t wch, const short vke
// - true iff we successfully wrote the keypress to the input callback.
bool InputStateMachineEngine::_WriteSingleKey(const short vkey, const DWORD modifierState)
{
const wchar_t wch = gsl::narrow_cast<wchar_t>(MapVirtualKey(vkey, MAPVK_VK_TO_CHAR));
const auto wch = gsl::narrow_cast<wchar_t>(MapVirtualKey(vkey, MAPVK_VK_TO_CHAR));
return _WriteSingleKey(wch, vkey, modifierState);
}
@@ -710,7 +710,7 @@ bool InputStateMachineEngine::_WriteSingleKey(const short vkey, const DWORD modi
// - true iff we successfully wrote the keypress to the input callback.
bool InputStateMachineEngine::_WriteMouseEvent(const size_t column, const size_t line, const DWORD buttonState, const DWORD controlKeyState, const DWORD eventFlags)
{
COORD uiPos = { gsl::narrow<short>(column) - 1, gsl::narrow<short>(line) - 1 };
COORD uiPos = { static_cast<SHORT>(gsl::narrow<short>(column) - 1), static_cast<SHORT>(gsl::narrow<short>(line) - 1) };
INPUT_RECORD rgInput;
rgInput.EventType = MOUSE_EVENT;

View File

@@ -156,10 +156,10 @@ namespace Microsoft::Console::VirtualTerminal
bool ActionSs3Dispatch(const wchar_t wch, const VTParameters parameters) override;
bool ParseControlSequenceAfterSs3() const noexcept override;
bool FlushAtEndOfString() const noexcept override;
bool DispatchControlCharsFromEscape() const noexcept override;
bool DispatchIntermediatesFromEscape() const noexcept override;
[[nodiscard]] bool ParseControlSequenceAfterSs3() const noexcept override;
[[nodiscard]] bool FlushAtEndOfString() const noexcept override;
[[nodiscard]] bool DispatchControlCharsFromEscape() const noexcept override;
[[nodiscard]] bool DispatchIntermediatesFromEscape() const noexcept override;
void SetFlushToInputQueueCallback(std::function<bool()> pfnFlushToInputQueue);

View File

@@ -49,15 +49,15 @@ namespace Microsoft::Console::VirtualTerminal
bool ActionSs3Dispatch(const wchar_t wch, const VTParameters parameters) noexcept override;
bool ParseControlSequenceAfterSs3() const noexcept override;
bool FlushAtEndOfString() const noexcept override;
bool DispatchControlCharsFromEscape() const noexcept override;
bool DispatchIntermediatesFromEscape() const noexcept override;
[[nodiscard]] bool ParseControlSequenceAfterSs3() const noexcept override;
[[nodiscard]] bool FlushAtEndOfString() const noexcept override;
[[nodiscard]] bool DispatchControlCharsFromEscape() const noexcept override;
[[nodiscard]] bool DispatchIntermediatesFromEscape() const noexcept override;
void SetTerminalConnection(Microsoft::Console::ITerminalOutputConnection* const pTtyConnection,
std::function<bool()> pfnFlushToTerminal);
const ITermDispatch& Dispatch() const noexcept;
[[nodiscard]] const ITermDispatch& Dispatch() const noexcept;
ITermDispatch& Dispatch() noexcept;
private:

View File

@@ -514,7 +514,7 @@ void StateMachine::_ActionParam(const wchar_t wch)
// If we have no parameters and we're about to add one, get the next value ready here.
if (_parameters.empty())
{
_parameters.push_back({});
_parameters.emplace_back();
}
// On a delimiter, increase the number of params we've seen.
@@ -532,7 +532,7 @@ void StateMachine::_ActionParam(const wchar_t wch)
else
{
// Otherwise move to next param.
_parameters.push_back({});
_parameters.emplace_back();
}
}
else
@@ -1475,7 +1475,7 @@ void StateMachine::_EventVt52Param(const wchar_t wch)
}
else
{
_parameters.push_back(wch);
_parameters.emplace_back(wch);
if (_parameters.size() == 2)
{
// The command character is processed before the parameter values,
@@ -2049,7 +2049,7 @@ void StateMachine::_AccumulateTo(const wchar_t wch, size_t& value) noexcept
// - <none>
// Return Value:
// - True if it is. False if it isn't.
const bool StateMachine::_IsVariableLengthStringState() const noexcept
bool StateMachine::_IsVariableLengthStringState() const noexcept
{
return _state == VTStates::OscString || _state == VTStates::DcsPassThrough || _state == VTStates::SosPmApcString;
}

View File

@@ -51,7 +51,7 @@ namespace Microsoft::Console::VirtualTerminal
bool FlushToTerminal();
const IStateMachineEngine& Engine() const noexcept;
[[nodiscard]] const IStateMachineEngine& Engine() const noexcept;
IStateMachineEngine& Engine() noexcept;
private:
@@ -115,7 +115,7 @@ namespace Microsoft::Console::VirtualTerminal
void _EventVariableLengthStringTermination(const wchar_t wch);
void _AccumulateTo(const wchar_t wch, size_t& value) noexcept;
const bool _IsVariableLengthStringState() const noexcept;
[[nodiscard]] bool _IsVariableLengthStringState() const noexcept;
enum class VTStates
{

View File

@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include <precomp.h>
#include "precomp.h"
#include "telemetry.hpp"
@@ -23,14 +23,9 @@ using namespace Microsoft::Console::VirtualTerminal;
// Disable 4351 so we can initialize the arrays to 0 without a warning.
#pragma warning(disable : 4351)
TermTelemetry::TermTelemetry() noexcept :
_uiTimesUsedCurrent(0),
_uiTimesFailedCurrent(0),
_uiTimesFailedOutsideRangeCurrent(0),
_uiTimesUsed(),
_uiTimesFailed(),
_uiTimesFailedOutsideRange(0),
_activityId(),
_fShouldWriteFinalLog(false)
_activityId()
{
TraceLoggingRegister(g_hConsoleVirtTermParserEventTraceProvider);
@@ -173,9 +168,9 @@ void TermTelemetry::WriteFinalTraceLog() const
if (!fLoggedSequence)
{
for (int n = 0; n < ARRAYSIZE(_uiTimesUsed); n++)
for (unsigned int n : _uiTimesUsed)
{
if (_uiTimesUsed[n] > 0)
if (n > 0)
{
fLoggedSequence = true;
break;
@@ -185,9 +180,9 @@ void TermTelemetry::WriteFinalTraceLog() const
if (!fLoggedSequence)
{
for (int n = 0; n < ARRAYSIZE(_uiTimesFailed); n++)
for (unsigned int n : _uiTimesFailed)
{
if (_uiTimesFailed[n] > 0)
if (n > 0)
{
fLoggedSequence = true;
break;

View File

@@ -123,14 +123,14 @@ namespace Microsoft::Console::VirtualTerminal
void WriteFinalTraceLog() const;
unsigned int _uiTimesUsedCurrent;
unsigned int _uiTimesFailedCurrent;
unsigned int _uiTimesFailedOutsideRangeCurrent;
unsigned int _uiTimesUsed[NUMBER_OF_CODES];
unsigned int _uiTimesFailed[CHAR_MAX + 1];
unsigned int _uiTimesFailedOutsideRange;
unsigned int _uiTimesUsedCurrent{0};
unsigned int _uiTimesFailedCurrent{0};
unsigned int _uiTimesFailedOutsideRangeCurrent{0};
unsigned int _uiTimesUsed[NUMBER_OF_CODES]{};
unsigned int _uiTimesFailed[CHAR_MAX + 1]{};
unsigned int _uiTimesFailedOutsideRange{0};
GUID _activityId;
bool _fShouldWriteFinalLog;
bool _fShouldWriteFinalLog{false};
};
}

View File

@@ -53,9 +53,9 @@ public:
IInputEvent& operator=(const IInputEvent&) & = default;
IInputEvent& operator=(IInputEvent&&) & = default;
virtual INPUT_RECORD ToInputRecord() const noexcept = 0;
[[nodiscard]] virtual INPUT_RECORD ToInputRecord() const noexcept = 0;
virtual InputEventType EventType() const noexcept = 0;
[[nodiscard]] virtual InputEventType EventType() const noexcept = 0;
#ifdef UNIT_TESTING
friend std::wostream& operator<<(std::wostream& stream, const IInputEvent* const pEvent);
@@ -63,8 +63,7 @@ public:
};
inline IInputEvent::~IInputEvent()
{
}
= default;
#ifdef UNIT_TESTING
std::wostream& operator<<(std::wostream& stream, const IInputEvent* pEvent);
@@ -167,13 +166,8 @@ public:
{
}
constexpr KeyEvent() noexcept :
_keyDown{ 0 },
_repeatCount{ 0 },
_virtualKeyCode{ 0 },
_virtualScanCode{ 0 },
_charData{ 0 },
_activeModifierKeys{ 0 }
constexpr KeyEvent() noexcept
{
}
@@ -199,7 +193,7 @@ public:
activeModifierKeys });
}
~KeyEvent();
~KeyEvent() override;
KeyEvent(const KeyEvent&) = default;
KeyEvent(KeyEvent&&) = default;
// For these two operators, there seems to be a bug in the compiler:
@@ -213,77 +207,77 @@ public:
KeyEvent& operator=(KeyEvent&&) & = default;
#pragma warning(pop)
INPUT_RECORD ToInputRecord() const noexcept override;
InputEventType EventType() const noexcept override;
[[nodiscard]] INPUT_RECORD ToInputRecord() const noexcept override;
[[nodiscard]] InputEventType EventType() const noexcept override;
constexpr bool IsShiftPressed() const noexcept
[[nodiscard]] constexpr bool IsShiftPressed() const noexcept
{
return WI_IsFlagSet(GetActiveModifierKeys(), SHIFT_PRESSED);
}
constexpr bool IsAltPressed() const noexcept
[[nodiscard]] constexpr bool IsAltPressed() const noexcept
{
return WI_IsAnyFlagSet(GetActiveModifierKeys(), ALT_PRESSED);
}
constexpr bool IsCtrlPressed() const noexcept
[[nodiscard]] constexpr bool IsCtrlPressed() const noexcept
{
return WI_IsAnyFlagSet(GetActiveModifierKeys(), CTRL_PRESSED);
}
constexpr bool IsAltGrPressed() const noexcept
[[nodiscard]] constexpr bool IsAltGrPressed() const noexcept
{
return WI_IsFlagSet(GetActiveModifierKeys(), LEFT_CTRL_PRESSED) &&
WI_IsFlagSet(GetActiveModifierKeys(), RIGHT_ALT_PRESSED);
}
constexpr bool IsModifierPressed() const noexcept
[[nodiscard]] constexpr bool IsModifierPressed() const noexcept
{
return WI_IsAnyFlagSet(GetActiveModifierKeys(), MOD_PRESSED);
}
constexpr bool IsCursorKey() const noexcept
[[nodiscard]] constexpr bool IsCursorKey() const noexcept
{
// true iff vk in [End, Home, Left, Up, Right, Down]
return (_virtualKeyCode >= VK_END) && (_virtualKeyCode <= VK_DOWN);
}
constexpr bool IsAltNumpadSet() const noexcept
[[nodiscard]] constexpr bool IsAltNumpadSet() const noexcept
{
return WI_IsFlagSet(GetActiveModifierKeys(), ALTNUMPAD_BIT);
}
constexpr bool IsKeyDown() const noexcept
[[nodiscard]] constexpr bool IsKeyDown() const noexcept
{
return _keyDown;
}
constexpr bool IsPauseKey() const noexcept
[[nodiscard]] constexpr bool IsPauseKey() const noexcept
{
return (_virtualKeyCode == VK_PAUSE);
}
constexpr WORD GetRepeatCount() const noexcept
[[nodiscard]] constexpr WORD GetRepeatCount() const noexcept
{
return _repeatCount;
}
constexpr WORD GetVirtualKeyCode() const noexcept
[[nodiscard]] constexpr WORD GetVirtualKeyCode() const noexcept
{
return _virtualKeyCode;
}
constexpr WORD GetVirtualScanCode() const noexcept
[[nodiscard]] constexpr WORD GetVirtualScanCode() const noexcept
{
return _virtualScanCode;
}
constexpr wchar_t GetCharData() const noexcept
[[nodiscard]] constexpr wchar_t GetCharData() const noexcept
{
return _charData;
}
constexpr DWORD GetActiveModifierKeys() const noexcept
[[nodiscard]] constexpr DWORD GetActiveModifierKeys() const noexcept
{
return static_cast<DWORD>(_activeModifierKeys);
}
@@ -297,9 +291,9 @@ public:
void SetActiveModifierKeys(const DWORD activeModifierKeys) noexcept;
void DeactivateModifierKey(const ModifierKeyState modifierKey) noexcept;
void ActivateModifierKey(const ModifierKeyState modifierKey) noexcept;
bool DoActiveModifierKeysMatch(const std::unordered_set<ModifierKeyState>& consoleModifiers) const;
bool IsCommandLineEditingKey() const noexcept;
bool IsPopupKey() const noexcept;
[[nodiscard]] bool DoActiveModifierKeysMatch(const std::unordered_set<ModifierKeyState>& consoleModifiers) const;
[[nodiscard]] bool IsCommandLineEditingKey() const noexcept;
[[nodiscard]] bool IsPopupKey() const noexcept;
// Function Description:
// - Returns true if the given VKey represents a modifier key - shift, alt,
@@ -325,12 +319,12 @@ public:
};
private:
bool _keyDown;
WORD _repeatCount;
WORD _virtualKeyCode;
WORD _virtualScanCode;
wchar_t _charData;
Modifiers _activeModifierKeys;
bool _keyDown{ 0 };
WORD _repeatCount{ 0 };
WORD _virtualKeyCode{ 0 };
WORD _virtualScanCode{ 0 };
wchar_t _charData{ 0 };
Modifiers _activeModifierKeys{ 0 };
friend constexpr bool operator==(const KeyEvent& a, const KeyEvent& b) noexcept;
#ifdef UNIT_TESTING
@@ -374,36 +368,36 @@ public:
{
}
~MouseEvent();
~MouseEvent() override;
MouseEvent(const MouseEvent&) = default;
MouseEvent(MouseEvent&&) = default;
MouseEvent& operator=(const MouseEvent&) & = default;
MouseEvent& operator=(MouseEvent&&) & = default;
INPUT_RECORD ToInputRecord() const noexcept override;
InputEventType EventType() const noexcept override;
[[nodiscard]] INPUT_RECORD ToInputRecord() const noexcept override;
[[nodiscard]] InputEventType EventType() const noexcept override;
constexpr bool IsMouseMoveEvent() const noexcept
[[nodiscard]] constexpr bool IsMouseMoveEvent() const noexcept
{
return _eventFlags == MOUSE_MOVED;
}
constexpr COORD GetPosition() const noexcept
[[nodiscard]] constexpr COORD GetPosition() const noexcept
{
return _position;
}
constexpr DWORD GetButtonState() const noexcept
[[nodiscard]] constexpr DWORD GetButtonState() const noexcept
{
return _buttonState;
}
constexpr DWORD GetActiveModifierKeys() const noexcept
[[nodiscard]] constexpr DWORD GetActiveModifierKeys() const noexcept
{
return _activeModifierKeys;
}
constexpr DWORD GetEventFlags() const noexcept
[[nodiscard]] constexpr DWORD GetEventFlags() const noexcept
{
return _eventFlags;
}
@@ -441,16 +435,16 @@ public:
{
}
~WindowBufferSizeEvent();
~WindowBufferSizeEvent() override;
WindowBufferSizeEvent(const WindowBufferSizeEvent&) = default;
WindowBufferSizeEvent(WindowBufferSizeEvent&&) = default;
WindowBufferSizeEvent& operator=(const WindowBufferSizeEvent&) & = default;
WindowBufferSizeEvent& operator=(WindowBufferSizeEvent&&) & = default;
INPUT_RECORD ToInputRecord() const noexcept override;
InputEventType EventType() const noexcept override;
[[nodiscard]] INPUT_RECORD ToInputRecord() const noexcept override;
[[nodiscard]] InputEventType EventType() const noexcept override;
constexpr COORD GetSize() const noexcept
[[nodiscard]] constexpr COORD GetSize() const noexcept
{
return _size;
}
@@ -482,16 +476,16 @@ public:
{
}
~MenuEvent();
~MenuEvent() override;
MenuEvent(const MenuEvent&) = default;
MenuEvent(MenuEvent&&) = default;
MenuEvent& operator=(const MenuEvent&) & = default;
MenuEvent& operator=(MenuEvent&&) & = default;
INPUT_RECORD ToInputRecord() const noexcept override;
InputEventType EventType() const noexcept override;
[[nodiscard]] INPUT_RECORD ToInputRecord() const noexcept override;
[[nodiscard]] InputEventType EventType() const noexcept override;
constexpr UINT GetCommandId() const noexcept
[[nodiscard]] constexpr UINT GetCommandId() const noexcept
{
return _commandId;
}
@@ -523,16 +517,16 @@ public:
{
}
~FocusEvent();
~FocusEvent() override;
FocusEvent(const FocusEvent&) = default;
FocusEvent(FocusEvent&&) = default;
FocusEvent& operator=(const FocusEvent&) & = default;
FocusEvent& operator=(FocusEvent&&) & = default;
INPUT_RECORD ToInputRecord() const noexcept override;
InputEventType EventType() const noexcept override;
[[nodiscard]] INPUT_RECORD ToInputRecord() const noexcept override;
[[nodiscard]] InputEventType EventType() const noexcept override;
constexpr bool GetFocus() const noexcept
[[nodiscard]] constexpr bool GetFocus() const noexcept
{
return _focus;
}

View File

@@ -33,7 +33,6 @@ typedef NTSTATUS* PNTSTATUS;
// End From ntdef.h
#define INLINE_NTSTATUS_FROM_WIN32 1 // Must use inline NTSTATUS or it will call the wrapped function twice.
#pragma warning(push)
#pragma warning(disable : 4430) // Must disable 4430 "default int" warning for C++ because ntstatus.h is inflexible SDK definition.
#include <ntstatus.h>