From cfaa93c074940ef10cd19fb413c45db6a89b9967 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 14 Nov 2023 11:08:05 -0500 Subject: [PATCH] Upgrade check-spelling to v0.0.22 Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .github/actions/spelling/advice.md | 4 +- .github/actions/spelling/allow.txt | 18 +- .github/actions/spelling/candidate.patterns | 201 ++++++++++++++---- .github/actions/spelling/excludes.txt | 55 ++++- .github/actions/spelling/expect.txt | 172 ++++++++------- .../actions/spelling/line_forbidden.patterns | 85 +++++++- .github/actions/spelling/patterns.txt | 27 ++- .github/actions/spelling/reject.txt | 1 + .github/workflows/spelling3.yml | 92 ++++++-- 9 files changed, 482 insertions(+), 173 deletions(-) diff --git a/.github/actions/spelling/advice.md b/.github/actions/spelling/advice.md index 1004eeaa604..84eb9218e2f 100644 --- a/.github/actions/spelling/advice.md +++ b/.github/actions/spelling/advice.md @@ -14,7 +14,9 @@ https://www.regexplanet.com/advanced/perl/) yours before committing to verify it * well-formed pattern. - If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, + 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]( diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt index 6eae5e64145..7217d35788e 100644 --- a/.github/actions/spelling/allow.txt +++ b/.github/actions/spelling/allow.txt @@ -50,6 +50,8 @@ binver Bitmask Blog blog +BLUETOOTH +Bluetooth boolalpha bstr bugfix @@ -129,8 +131,8 @@ deserializing dest devblogs differentpath -DISMAPI DIRECTONLY +DISMAPI distro dll dllexport @@ -265,8 +267,8 @@ INVALIDSID iomanip iostream IPinning -IPortable ipmo +IPortable ISAPPROVEDFOROUTPUT isspace istream @@ -322,6 +324,8 @@ mrm msbuild msdata MSDN +MSHCTX +MSHLFLAGS msi msiexec msix @@ -331,8 +335,6 @@ msixmgr msixsdk msixsdkx msixtest -MSHCTX -MSHLFLAGS msrc Multifile Multimatch @@ -389,6 +391,7 @@ packagefamilyname packageidentifier packagename PACKAGESSCHEMA +paket Params params parentidx @@ -463,6 +466,7 @@ removemanifest removepin removeportablefile repolibtest +REQS requeue rescap resetpins @@ -474,7 +478,6 @@ RESTSOURCE resw resx rethrowing -REQS roadmap robuffer rowcount @@ -578,7 +581,6 @@ symlink symlinks symlinktarget Sys -sz TARG TARGETDIR targetentrypoint @@ -611,7 +613,6 @@ triaged trunc TRUSTEDPEOPLE trx -tt ttl typedef typename @@ -674,7 +675,6 @@ versioning VERYSILENT VFT visualstudio -vm VOS vso wapproj @@ -728,5 +728,3 @@ XTOKEN xunit yaml yml -yy -zh diff --git a/.github/actions/spelling/candidate.patterns b/.github/actions/spelling/candidate.patterns index 4b40e728ee3..a9b28345e8d 100644 --- a/.github/actions/spelling/candidate.patterns +++ b/.github/actions/spelling/candidate.patterns @@ -2,24 +2,39 @@ ^.*/\* #no-spell-check-line \*/.*$ # marker for ignoring a comment to the end of the line // #no-spell-check.*$ +# marker to ignore all code on line +^.*\bno-spell-check(?:-line|)(?:\s.*|)$ + +# https://cspell.org/configuration/document-settings/ +# cspell inline +^.*\b[Cc][Ss][Pp][Ee][Ll]{2}:\s*[Dd][Ii][Ss][Aa][Bb][Ll][Ee]-[Ll][Ii][Nn][Ee]\b # patch hunk comments ^\@\@ -\d+(?:,\d+|) \+\d+(?:,\d+|) \@\@ .* # git index header -index [0-9a-z]{7,40}\.\.[0-9a-z]{7,40} +index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40} + +# file permissions +['"`\s][-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s] + +# css url wrappings +\burl\([^)]+\) # cid urls (['"])cid:.*?\g{-1} # data url in parens -\(data:[^)]*?(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})[^)]*\) +\(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:(?:[^ `'"].*?|)(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1} # data url data:[-a-zA-Z=;:/0-9+]*,\S* +# https/http/file urls +#(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|] + # mailto urls -mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,} +mailto:[-a-zA-Z=;:/?%&0-9+@._]{3,} # magnet urls magnet:[?=:\w]+ @@ -35,6 +50,9 @@ magnet:[?=:\w]+ # asciinema \basciinema\.org/a/[0-9a-zA-Z]+ +# asciinema v2 +^\[\d+\.\d+, "[io]", ".*"\]$ + # apple \bdeveloper\.apple\.com/[-\w?=/]+ # Apple music @@ -89,7 +107,7 @@ vpc-\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]+)* +\bgroups\.google\.com(?:/[a-z]+/(?:#!|)[^/\s"]+)* # Google Maps \bmaps\.google\.com/maps\?[\w&;=]* # Google themes @@ -117,6 +135,8 @@ themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+. (?:\[`?[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 SHA refs +\[([0-9a-f]+)\]\(https://(?:www\.|)github.com/[-\w]+/[-\w]+/commit/\g{-1}[0-9a-f]* # GitHub wiki \bgithub\.com/(?:[^/]+/){2}wiki/(?:(?:[^/]+/|)_history|[^/]+(?:/_compare|)/[0-9a-f.]{40,})\b # githubusercontent @@ -128,9 +148,9 @@ themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+. # git.io \bgit\.io/[0-9a-zA-Z]+ # GitHub JSON -"node_id": "[-a-zA-Z=;:/0-9+]*" +"node_id": "[-a-zA-Z=;:/0-9+_]*" # Contributor -\[[^\]]+\]\(https://github\.com/[^/\s"]+\) +\[[^\]]+\]\(https://github\.com/[^/\s"]+/?\) # GHSA GHSA(?:-[0-9a-z]{4}){3} @@ -143,8 +163,8 @@ GHSA(?:-[0-9a-z]{4}){3} # GitLab commits \bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b -# binanace -accounts.binance.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]* +# binance +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]+ @@ -280,9 +300,9 @@ slack://[a-zA-Z0-9?&=]+ \bdropbox\.com/sh?/[^/\s"]+/[-0-9A-Za-z_.%?=&;]+ # ipfs protocol -ipfs://[0-9a-z]* +ipfs://[0-9a-zA-Z]{3,} # ipfs url -/ipfs/[0-9a-z]* +/ipfs/[0-9a-zA-Z]{3,} # w3 \bw3\.org/[-0-9a-zA-Z/#.]+ @@ -359,14 +379,22 @@ ipfs://[0-9a-z]* # tinyurl \btinyurl\.com/\w+ +# codepen +\bcodepen\.io/[\w/]+ + +# registry.npmjs.org +\bregistry\.npmjs\.org/(?:@[^/"']+/|)[^/"']+/-/[-\w@.]+ + # getopts \bgetopts\s+(?:"[^"]+"|'[^']+') # ANSI color codes -(?:\\(?:u00|x)1b|\x1b)\[\d+(?:;\d+|)m +(?:\\(?:u00|x)1[Bb]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+|)m # URL escaped characters -\%[0-9A-F][A-F] +\%[0-9A-F][A-F](?=[A-Za-z]) +# lower URL escaped characters +\%[0-9a-f][a-f](?=[a-z]{2,}) # 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) @@ -376,7 +404,7 @@ ipfs://[0-9a-z]* # sha sha\d+:[0-9]*[a-f]{3,}[0-9a-f]* # sha-... -- uses a fancy capture -(['"]|")[0-9a-f]{40,}\g{-1} +(\\?['"]|")[0-9a-f]{40,}\g{-1} # hex runs \b[0-9a-fA-F]{16,}\b # hex in url queries @@ -391,18 +419,21 @@ sha\d+:[0-9]*[a-f]{3,}[0-9a-f]* # Well known gpg keys .well-known/openpgpkey/[\w./]+ +# pki +-----BEGIN.*-----END + # 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 +(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b # integrity -integrity="sha\d+-[-a-zA-Z=;:/0-9+]{40,}" +integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1} # https://www.gnu.org/software/groff/manual/groff.html # man troff content \\f[BCIPR] -# ' -\\\(aq +# '/" +\\\([ad]q # .desktop mime types ^MimeTypes?=.*$ @@ -411,46 +442,80 @@ integrity="sha\d+-[-a-zA-Z=;:/0-9+]{40,}" # Localized .desktop content Name\[[^\]]+\]=.* -# IServiceProvider -\bI(?=(?:[A-Z][a-z]{2,})+\b) +# IServiceProvider / isAThing +\b(?:I|isA)(?=(?:[A-Z][a-z]{2,})+\b) # crypt -"\$2[ayb]\$.{56}" +(['"])\$2[ayb]\$.{56}\g{-1} # scrypt / argon \$(?:scrypt|argon\d+[di]*)\$\S+ +# go.sum +\bh1:\S+ + +# scala modules +("[^"]+"\s*%%?\s*){2,3}"[^"]+" + # Input to GitHub JSON -content: "[-a-zA-Z=;:/0-9+]*=" +content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1} + +# This does not cover multiline strings, if your repository has them, +# you'll want to remove the `(?=.*?")` suffix. +# The `(?=.*?")` suffix should limit the false positives rate +# printf +#%(?:(?:(?:hh?|ll?|[jzt])?[diuoxn]|l?[cs]|L?[fega]|p)(?=[a-z]{2,})|(?:X|L?[FEGA]|p)(?=[a-zA-Z]{2,}))(?=[_a-zA-Z]+\b)(?!%)(?=.*?['"]) -# Python stringprefix / binaryprefix +# Python string prefix / binary prefix # 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 -(?|m([|!/@#,;']).*?\g{-1}) + +# perl qr regex +(?|\(.*?\)|([|!/@#,;']).*?\g{-1}) + +# perl run +perl(?:\s+-[a-zA-Z]\w*)+ # Go regular expressions regexp?\.MustCompile\(`[^`]*`\) +# regex choice +\(\?:[^)]+\|[^)]+\) + +# proto +^\s*(\w+)\s\g{-1} = + # sed regular expressions sed 's/(?:[^/]*?[a-zA-Z]{3,}[^/]*?/){2} +# node packages +(["'])\@[^/'" ]+/[^/'" ]+\g{-1} + # go install go install(?:\s+[a-z]+\.[-@\w/.]+)+ +# jetbrains schema https://youtrack.jetbrains.com/issue/RSRP-489571 +urn:shemas-jetbrains-com + # 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+ @@ -462,19 +527,47 @@ go install(?:\s+[a-z]+\.[-@\w/.]+)+ -[0-9a-f]{10}-\w{5}\s # posthog secrets -posthog\.init\((['"])phc_[^"',]+\g{-1}, +([`'"])phc_[^"',]+\g{-1} # xcode # xcodeproject scenes -(?:Controller|ID|id)="\w{3}-\w{2}-\w{3}" +(?:Controller|destination|ID|id)="\w{3}-\w{2}-\w{3}" # xcode api botches customObjectInstantitationMethod +# configure flags +.* \| --\w{2,}.*?(?=\w+\s\w+) + # font awesome classes \.fa-[-a-z0-9]+ +# bearer auth +(['"])Bear[e][r] .*?\g{-1} + +# basic auth +(['"])Basic [-a-zA-Z=;:/0-9+]{3,}\g{-1} + +# base64 encoded content +([`'"])[-a-zA-Z=;:/0-9+]+=\g{-1} +# base64 encoded content in xml/sgml +>[-a-zA-Z=;:/0-9+]+== 0.0.22) +\\\w{2,}\{ + +# eslint +"varsIgnorePattern": ".+" + +# Windows short paths +[/\\][^/\\]{5,6}~\d{1,2}[/\\] + +# in check-spelling@v0.0.22+, printf markers aren't automatically consumed +# printf markers +#(?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 (Unix, Java/Scala) +# Use if you have things like `-Pdocker` and want to treat them as `docker` +#(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) + +# Compiler flags (Windows / PowerShell) +# This is a subset of the more general compiler flags pattern. +# It avoids matching `-Path` to prevent it from being treated as `ath` +#(?:^|[\t ,"'`=(])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[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 diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt index ea76096b0f5..0a050ec751a 100644 --- a/.github/actions/spelling/excludes.txt +++ b/.github/actions/spelling/excludes.txt @@ -2,30 +2,44 @@ (?:^|/)(?i)COPYRIGHT (?:^|/)(?i)LICEN[CS]E (?:^|/)3rdparty/ +(?:^|/)AUTHORS$ (?:^|/)go\.sum$ (?:^|/)package(?:-lock|)\.json$ +(?:^|/)Pipfile$ +(?:^|/)PSGet\.Resource\.psd1$ +(?:^|/)pyproject.toml +(?:^|/)requirements(?:-dev|-doc|-test|)\.txt$ (?:^|/)vendor/ /shared\.manifest$ +/thirdparty/ \.a$ \.ai$ +\.all-contributorsrc$ \.avi$ \.bmp$ \.bz2$ \.cer$ \.class$ +\.coveragerc$ +\.crl$ \.crt$ +\.csr$ \.dll$ \.docx?$ \.drawio$ \.DS_Store$ \.eot$ +\.eps$ \.exe$ \.gif$ +\.git-blame-ignore-revs$ \.gitattributes$ +\.gitkeep$ \.graffle$ \.gz$ \.icns$ \.ico$ +\.ipynb$ \.jar$ \.jks$ \.jpe?g$ @@ -34,6 +48,7 @@ \.lock$ \.map$ \.min\.. +\.mo$ \.mod$ \.mp[34]$ \.msix$ @@ -41,15 +56,24 @@ \.o$ \.ocf$ \.otf$ +\.p12$ +\.parquet$ \.pdf$ \.pem$ +\.pfx$ \.png$ \.psd$ \.pyc$ +\.pylintrc$ +\.qm$ \.s$ +\.sig$ \.sln$ +\.so$ \.svgz?$ +\.sys$ \.tar$ +\.tgz$ \.tiff?$ \.ttf$ \.vcxitems$ @@ -62,15 +86,15 @@ \.webp$ \.winmd$ \.woff2?$ +\.xcf$ \.xlsx?$ +\.xpm$ +\.xz$ \.zip$ ^\.github/actions/spelling/ ^\.github/policies/ ^\.github/workflows/spelling\d*\.yml$ -^\Qsrc/PureLib/pure/AUTHORS\E$ ^cgmanifest\.json$ -^Localization/ -^NOTICE ^src/AppInstallerCLICore/Commands/ExperimentalCommand\.cpp$ ^src/AppInstallerCLIE2ETests/TestData/AppInstallerTestMsiInstaller.msi$ ^src/AppInstallerCLITests/TestData/InputARPData.txt$ @@ -78,6 +102,24 @@ ^src/AppInstallerCLITests/TestData/InputPublishers.txt$ ^src/AppInstallerCLITests/TestData/NormalizationInitialIds.txt$ ^src/AppInstallerCommonCore/external/do.h$ +^\Qsrc/AppInstallerCLIE2ETests/TestData/Configuration/Empty.yml\E$ +^\Qsrc/cpprestsdk/cpprestsdk/Release/samples/BlackJack/BlackJack_UIClient/Cards.PNG\E$ +^\Qsrc/PowerShell/ExternalModules/PackageManagement/1.4.8.1/DSCResources/MSFT_PackageManagement/MSFT_PackageManagement.psm1\E$ +^\Qsrc/PowerShell/ExternalModules/PackageManagement/1.4.8.1/DSCResources/PackageManagementDscUtilities.psm1\E$ +^\Qsrc/PowerShell/ExternalModules/PackageManagement/1.4.8.1/PackageManagement.format.ps1xml\E$ +^\Qsrc/PowerShell/ExternalModules/PackageManagement/1.4.8.1/PackageManagement.psd1\E$ +^\Qsrc/PowerShell/ExternalModules/PackageManagement/1.4.8.1/PackageManagement.psm1\E$ +^\Qsrc/PowerShell/ExternalModules/PackageManagement/1.4.8.1/PackageManagement.Resources.psd1\E$ +^\Qsrc/PowerShell/ExternalModules/PackageManagement/1.4.8.1/PackageProviderFunctions.psm1\E$ +^\Qsrc/PowerShell/ExternalModules/PowerShellGet/2.2.5/DscResources/MSFT_PSModule/en-US/MSFT_PSModule.strings.psd1\E$ +^\Qsrc/PowerShell/ExternalModules/PowerShellGet/2.2.5/DscResources/MSFT_PSModule/MSFT_PSModule.psm1\E$ +^\Qsrc/PowerShell/ExternalModules/PowerShellGet/2.2.5/DscResources/MSFT_PSModule/MSFT_PSModule.schema.mof\E$ +^\Qsrc/PowerShell/ExternalModules/PowerShellGet/2.2.5/DscResources/MSFT_PSRepository/en-US/MSFT_PSRepository.strings.psd1\E$ +^\Qsrc/PowerShell/ExternalModules/PowerShellGet/2.2.5/DscResources/MSFT_PSRepository/MSFT_PSRepository.psm1\E$ +^\Qsrc/PowerShell/ExternalModules/PowerShellGet/2.2.5/DscResources/MSFT_PSRepository/MSFT_PSRepository.schema.mof\E$ +^\Qsrc/PowerShell/ExternalModules/PowerShellGet/2.2.5/PowerShellGet.psd1\E$ +^\Qsrc/PowerShell/ExternalModules/PowerShellGet/2.2.5/PSGet.Format.ps1xml\E$ +^\Qsrc/PowerShell/ExternalModules/PowerShellGet/2.2.5/PSModule.psm1\E$ ^src/catch2/ ^src/cpprestsdk/ ^src/JsonCppLib/ @@ -87,7 +129,6 @@ ^src/Valijson/ ^src/Xlang/ ^src/YamlCppLib/ -# Because it doesn't handle argument -Words well -^tools/CorrelationTestbed/.*\.ps1$ -^tools/COMTrace/ComTrace.wprp$ -ignore$ +^Localization/ +^NOTICE +^src/PowerShell/ExternalModules/PowerShellGet/2\.2\.5/Modules/ diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 8206c8bae54..bbd144c148e 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -1,11 +1,9 @@ -abcd -ABORTIFHUNG accepteula +acl adjacents adml admx AFAIK -agg aicli AICLIC allusers @@ -22,6 +20,7 @@ applic appname appshutdown APPTERMINATION +aps argumentlist ARMNT arp @@ -34,56 +33,53 @@ ASwitch ASYNCRTIMP Atest ATL -attr AType AUrl Authenticode -azurefd +axo azurewebsites +bak bcp BEFACEF bfd BFirst bght BITMAPINFOHEADER -bitmask bkup blargle blockedbypolicy blogs bluetooth -bomgar +Bomgar BOMs boop boundparms bpp Browsable BSODs +btp +buildhelp BUILDOUTDIR buildtransitive -BUILTINS +cachefile cancelledbyuser casemap casemappings cch -CDEF centralus certmgr -certs -cgi +cfr cinq CLASSNOTREG CLIE CLOSEAPP cloudapp -cls clsctx -clsid +clsids CODEOWNERS COINIT COMGLB commandline -Configx contactsupport contentfiles contoso @@ -92,63 +88,65 @@ corecrt count'th countof countryregion +coveragexml CPIL -cplusplus createmanifestmetadata +csdef +CSTR cswinrt +csx ctc +curated currentuser -cxfsgwfxarb DACL datetimeoffset Dbg +dbmdl +dbproj +Dcom debian dedupe deigh deleteifnotneeded DENYWR +dependant desktopappinstaller devhome dic diskfull -dismapi +dism +dlldata dllimport -DMPAs dnld Dobbeleer -dsc +docstates DUPLICATEALIAS dustojnikhummer dvinns +ecf ecfr ecfrbrowse ECustom EFGH EFile efileresource -endregion ENDSESSION EPester epth EQU -errcode -errmsg ERRORONEXIT ESource ESRB -ests etest etl execustom EXEHASH experimentalfeatures -fabricbot fdw FECAFEB fedorapeople fileinuse Filtercriteria -Finalizers fintimes Fixfor flargle @@ -166,9 +164,9 @@ fzanollo gcpi GESMBH GHS +gitlab gity goku -Google GRPICONDIR GRPICONDIRENTRY guiddef @@ -176,9 +174,11 @@ Hackathon hashtable helplib helplibrary +hhc +hhk +hhp hhx highcontrast -HINSTANCE hkey hlocal hmodule @@ -186,22 +186,18 @@ Howto hre hresults hrow -hwg hwnd IARP IAttachment -ICONDIR ICONDIRENTRY ICONIMAGE idl idx -IEnum IFACEMETHODIMP -IHelp iid IISOn ilemode -inet +img inproc installinprogress INSTALLPROPERTY @@ -211,18 +207,21 @@ insufficientmemory Intelli INTRESOURCE invalidparameter -IPackage +iobj +ipch +ipdb isable IServer ishelp ISQ ISVs itr -IWin JArray JDictionary jdk jfearn +jfm +jmconfig JObject jpalardy JREs @@ -234,20 +233,19 @@ Kaido KNOWNFOLDERID ktf ldcase +ldf learnxinyminutes libsolv libyaml -Linq +Lifecycle liv liwpx localizationpriority localsource +Logon LOWORD LPARAM -LPBYTE -LPCWSTR lpdw -LPDWORD lpfn LPGRPICONDIR LPGRPICONDIRENTRY @@ -255,11 +253,9 @@ LPICONDIR LPICONDIRENTRY LPICONIMAGE lpitemidlist -LPSTR lpsz LPW LPWCH -LPWSTR LRESULT LSTATUS LTDA @@ -273,10 +269,12 @@ Maxed maxvalue maybenull MBH +mdf mdmp MDs megamorf meme +mfractor midl minexample minidump @@ -293,7 +291,6 @@ msftrubengu MSIHASH MSIXHASH msstore -Mta Mugiwara Multideclaration mycustom @@ -301,11 +298,12 @@ myinstalldir mylog mysilent mysilentwithprogress -nameof nativehandle NBLGGH +ncb +NCrunch +ndf NESTEDINSTALLER -netfx netlify NETSDK Newtonsoft @@ -328,13 +326,20 @@ notmatch NOTRACK NOUPDATE npmjs +Nsight nsis +ntvs nuffing +NVidia +nvuser objbase objidl +Objs +odx ofile -ools oop +opendb +opensdf OPTOUT osfhandle Outptr @@ -343,25 +348,26 @@ packageinuse packageinusebyapplication PACL PARAMETERMAP -paramref pathparts Patil pcb PCCERT PCs pcwsz -PDWORD PEGI PFM pfn pfxpath +pgc +pgd Pherson +pidb pidl pidlist pkgmgr pkindex pkix -pme +plg PMS positionals powershellgallery @@ -372,51 +378,62 @@ productcode PRODUCTICON proxystub pscustomobject -pseudocode +psess PSHOST psobject ptstr -publickey +PTVS +publishproj +publishsettings pvk pvm pwabuilder PWAs PWSTR +pycache QUERYENDSESSION qword +rcf +rdl rebootinitiated rebootrequiredforinstall rebootrequiredtofinish -redirector Redist REFIID REGDB regexes REGSAM relativefilepath -remoting reparse restsource RGBQUAD -rgex rgp rgpsz riid -roblox +Roblox ronomon rosoft rowids roy +rptproj RRF rrr +rsp +rsuser RTTI runspace runtimeclass ryfu rzkzqaqjwj SARL +sbr +scc schematab +schemaview +Scm +Screenshot sddl +sdf SECUREFILEPATH secureobject securestring @@ -429,12 +446,13 @@ SETTINGMAPPING SHCONTF SHGDN SHOWNORMAL -sid Sideload SIGNATUREHASH +Silverlight Sku SLAPI SMTO +snk sortof sourceforge SOURCESDIRECTORY @@ -444,48 +462,38 @@ SPAPI Srinivasan SRL srs -standalone -startswith STARTUPINFOW STDMETHODCALLTYPE STRRET stylecop -subdir subkey +suo superstring -suppy +svclog swervy SYD SYG -Syncy sysrefcomp systemnotsupported Tagit taskhostw -TCpp tcs +Telerik TEMPDIRECTORY -Templating temppath testdata testexampleinstaller thiscouldbeapc threehundred timespan -timezone +tlb Tlg +tlh +tli tombstoned -TOperation -TOptions -TProgress +tpl transitioning -TResult -TReturn trimstart -TState -TStatus -TType -typeparam UCase ucasemap UChars @@ -498,7 +506,6 @@ uninstallation uninstaller uninstallprevious uninstalls -Unk unknwn Unknwnbase unparsable @@ -508,26 +515,28 @@ upgradable upgradecode URLZONE userfilesetting +userosscache +userprefs userprofile -UWP +uwp VALUENAMECASE +vbw vclib -VERSI -VERSIE vns vsconfig +vsp +vspscc +vspx +vssscc vstest wcex +WDAG webpages -Webserver -websites -WERSJA +website wesome -wfopen wfsopen wgetenv Whatif -winapifamily windir windowsdeveloper winerror @@ -541,10 +550,13 @@ winstring withstarts Wnd WNDCLASSEX +workflows WPARAM +Wpp wpr wprp wputenv +wsb wsl wsv wto diff --git a/.github/actions/spelling/line_forbidden.patterns b/.github/actions/spelling/line_forbidden.patterns index 9050d6614c7..d01ced92ac3 100644 --- a/.github/actions/spelling/line_forbidden.patterns +++ b/.github/actions/spelling/line_forbidden.patterns @@ -1,4 +1,6 @@ -# reject `m_data` as there's a certain OS which has evil defines that break things if it's used elsewhere +# reject `m_data` as VxWorks defined it and that breaks things if it's used elsewhere +# see [fprime](https://github.com/nasa/fprime/commit/d589f0a25c59ea9a800d851ea84c2f5df02fb529) +# and [Qt](https://github.com/qtproject/qt-solutions/blame/fb7bc42bfcc578ff3fa3b9ca21a41e96eb37c1c7/qtscriptclassic/src/qscriptbuffer_p.h#L46) # \bm_data\b # If you have a framework that uses `it()` for testing and `fit()` for debugging a specific test, @@ -6,40 +8,84 @@ # to use this: #\bfit\( +# s.b. anymore +\bany more[,.] + +# s.b. cannot +\b[Cc]an not\b + # s.b. GitHub -\bGithub\b +(?]* @@ -60,7 +69,7 @@ REQUIRE\(RestHelper::GetRestAPIBaseUri\(".*"\) == L".*" # Automatically suggested patterns # hit-count: 407 file-count: 78 # IServiceProvider -\bI(?=(?:[A-Z][a-z]{2,})+\b) +\b[IT](?=(?:[A-Z][a-z]{2,})+(?:[A-Z]|\b)) # hit-count: 13 file-count: 9 # GitHub SHAs (markdown) @@ -141,16 +150,18 @@ ReplaceWhileCopying\(L.*\) # acceptable duplicates # ls directory listings -[-bcdlpsw](?:[-r][-w][-sx]){3}\s+\d+\s+(\S+)\s+\g{-1}\s+\d+\s+ -# C types -\s(Architecture|long|LONG) \g{-1}\s +[-bcdlpsw](?:[-r][-w][-SsTtx]){3}[\.+*]?\s+\d+\s+\S+\s+\S+\s+\d+\s+ +# mount +\bmount\s+-t\s+(\w+)\s+\g{-1}\b # C types and repeated CSS values -\s(center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?: \g{-1})+\s +\s(Architecture|auto|center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?: \g{-1})+\s +# C struct +\bstruct\s+(\w+)\s+\g{-1}\b # go templates -\s(\w+)\s+\g{-1}\s+\`(?:graphql|json|yaml): -# javadoc / .net -(?:[\\@](?:groupname|param)|(?:public|private)(?:\s+static|\s+readonly)*)\s+(\w+)\s+\g{-1}\s +\s(\w+)\s+\g{-1}\s+\`(?:graphql|inject|json|yaml): +# doxygen / javadoc / .net +(?:[\\@](?:brief|groupname|t?param|return|retval)|(?:public|private|\[Parameter(?:\(.+\)|)\])(?:\s+static|\s+override|\s+readonly)*)(?:\s+\{\w+\}|)\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*$ diff --git a/.github/actions/spelling/reject.txt b/.github/actions/spelling/reject.txt index b5a6d36809f..e5e4c3eef82 100644 --- a/.github/actions/spelling/reject.txt +++ b/.github/actions/spelling/reject.txt @@ -1,4 +1,5 @@ ^attache$ +^bellow$ benefitting occurences? ^dependan.* diff --git a/.github/workflows/spelling3.yml b/.github/workflows/spelling3.yml index 1841e2437c9..e3b0a0138ac 100644 --- a/.github/workflows/spelling3.yml +++ b/.github/workflows/spelling3.yml @@ -36,6 +36,29 @@ name: Check Spelling # # For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key +# Sarif reporting +# +# Access to Sarif reports is generally restricted (by GitHub) to members of the repository. +# +# Requires enabling `security-events: write` +# and configuring the action with `use_sarif: 1` +# +# For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Sarif-output + +# Minimal workflow structure: +# +# on: +# push: +# ... +# pull_request_target: +# ... +# jobs: +# # you only want the spelling job, all others should be omitted +# spelling: +# # remove `security-events: write` and `use_sarif: 1` +# # remove `experimental_apply_changes_via_bot: 1` +# ... otherwise adjust the `with:` as you wish + on: push: branches: @@ -45,12 +68,13 @@ on: pull_request_target: branches: - "**" - tags-ignore: - - "**" types: - 'opened' - 'reopened' - 'synchronize' + issue_comment: + types: + - 'created' jobs: spelling: @@ -59,10 +83,11 @@ jobs: contents: read pull-requests: read actions: read + security-events: write outputs: followup: ${{ steps.spelling.outputs.followup }} runs-on: ubuntu-latest - if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'" + 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 @@ -70,26 +95,29 @@ jobs: steps: - name: check-spelling id: spelling - uses: check-spelling/check-spelling@v0.0.21 + uses: check-spelling/check-spelling@v0.0.22 with: - suppress_push_for_open_pull_request: 1 + suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }} checkout: true check_file_names: 1 - spell_check_this: check-spelling/spell-check-this@prerelease + spell_check_this: microsoft/winget-cli@master post_comment: 0 use_magic_file: 1 - extra_dictionary_limit: 10 + warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check + experimental_apply_changes_via_bot: ${{ github.repository_owner != 'microsoft' && 1 }} + use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }} + extra_dictionary_limit: 20 extra_dictionaries: - cspell:software-terms/src/software-terms.txt - cspell:cpp/src/stdlib-c.txt - cspell:node/node.txt - cspell:mnemonics/src/mnemonics.txt + cspell:software-terms/dict/softwareTerms.txt cspell:cpp/src/stdlib-cpp.txt - cspell:html/html.txt - cspell:fullstack/fullstack.txt + cspell:cpp/src/stdlib-c.txt + cspell:dotnet/dict/dotnet.txt + cspell:python/src/python/python-lib.txt + cspell:php/dict/php.txt + cspell:node/dict/node.txt cspell:filetypes/filetypes.txt - cspell:cpp/src/stdlib-cmath.txt - cspell:aws/aws.txt + cspell:csharp/csharp.txt + check_extra_dictionaries: '' comment-push: name: Report (Push) @@ -101,10 +129,10 @@ jobs: if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push' steps: - name: comment - uses: check-spelling/check-spelling@v0.0.21 + uses: check-spelling/check-spelling@v0.0.22 with: checkout: true - spell_check_this: check-spelling/spell-check-this@prerelease + spell_check_this: microsoft/winget-cli@master task: ${{ needs.spelling.outputs.followup }} comment-pr: @@ -113,12 +141,38 @@ jobs: runs-on: ubuntu-latest needs: spelling permissions: + contents: read 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 + uses: check-spelling/check-spelling@v0.0.22 with: checkout: true - spell_check_this: check-spelling/spell-check-this@prerelease + spell_check_this: microsoft/winget-cli@main task: ${{ needs.spelling.outputs.followup }} + experimental_apply_changes_via_bot: ${{ github.repository_owner != 'microsoft' && 1 }} + + update: + name: Update PR + permissions: + contents: write + pull-requests: write + actions: read + runs-on: ubuntu-latest + if: ${{ + github.repository_owner != 'microsoft' && + github.event_name == 'issue_comment' && + github.event.issue.pull_request && + contains(github.event.comment.body, '@check-spelling-bot apply') + }} + concurrency: + group: spelling-update-${{ github.event.issue.number }} + cancel-in-progress: false + steps: + - name: apply spelling updates + uses: check-spelling/check-spelling@v0.0.22 + with: + experimental_apply_changes_via_bot: 1 + checkout: true + ssh_key: "${{ secrets.CHECK_SPELLING }}"