From cc472c267b945cfaccc1946a24fa530e75dd1b0d Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 28 May 2020 09:01:52 -0400 Subject: [PATCH] ci: spelling: update to 0.0.16a; update advice (#5922) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary of the Pull Request Updates the check spelling action to [0.0.16-a](https://github.com/check-spelling/check-spelling/releases/tag/0.0.16-alpha) * update advice -- [sample](https://github.com/jsoref/terminal/commit/57fc13f6c6fa0a79a06acb94de5005904a2e1222#commitcomment-39489723) -- I really do encourage others to adjust it as desired * rename `expect` (there are consumers who were not a fan of the `whitelist` nomenclature) * prune stale items * some `patterns` improvements to reduce the number of items in `expect` :warning: Anyone with an inflight addition of a new file to the `whitelist` directory will be moderately unhappy as the action would only use items from there if it didn't find `expect` (and this PR includes the rename). ## References ## PR Checklist * [ ] Closes #xxx * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments Runs should be ~30s faster. I was hoping to be able to offer the ability to talk to the bot, but sadly that feature is still not quite ready -- and I suspect that I may want to let projects opt in/out of that feature. ## Validation Steps Performed * I added a commit with misspellings: https://github.com/jsoref/terminal/commit/57fc13f6c6fa0a79a06acb94de5005904a2e1222 ❌ and ran the command it suggested (in bash). * The commit [itself passes its own testing](https://github.com/jsoref/terminal/commit/78df00dcf6cc7b81ffe2f604881e20552d3c94be) ✔️ The commands were never `cmd`/`psh` friendly. This iteration is designed to make it easier for a bot to parse and eventually do the work in response to a GitHub request, sadly that feature is behind schedule. --- .github/actions/spell-check/advice.txt | 18 +++-- .../actions/spell-check/dictionary/apis.txt | 4 ++ .../actions/spell-check/dictionary/names.txt | 3 + .github/actions/spell-check/excludes.txt | 1 + .github/actions/spell-check/expect/README.md | 13 ++++ .../{whitelist => expect}/alphabet.txt | 2 +- .../whitelist.txt => expect/expect.txt} | 65 +------------------ .../spell-check/{whitelist => expect}/web.txt | 0 .../actions/spell-check/patterns/patterns.txt | 4 +- .../actions/spell-check/whitelist/README.md | 7 -- .github/workflows/spelling.yml | 2 +- 11 files changed, 40 insertions(+), 79 deletions(-) create mode 100644 .github/actions/spell-check/expect/README.md rename .github/actions/spell-check/{whitelist => expect}/alphabet.txt (98%) rename .github/actions/spell-check/{whitelist/whitelist.txt => expect/expect.txt} (98%) rename .github/actions/spell-check/{whitelist => expect}/web.txt (100%) delete mode 100644 .github/actions/spell-check/whitelist/README.md diff --git a/.github/actions/spell-check/advice.txt b/.github/actions/spell-check/advice.txt index 37cdd512048..7a5ed8d20c3 100644 --- a/.github/actions/spell-check/advice.txt +++ b/.github/actions/spell-check/advice.txt @@ -3,13 +3,21 @@ :pencil2: Contributor please read this -* If the items listed above are names, please add them to `.github/actions/spell-check/dictionary/names.txt`. -* If they're APIs, you can add them to a file in `.github/actions/spell-check/dictionary/`. -* If they're just things you're using, please add them to an appropriate file in `.github/actions/spell-check/whitelist/`. -* If you need to use a specific token in one place and it shouldn't generally be used, you can -add an item in an appropriate file in `.github/actions/spell-check/patterns/`. +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: + #### :warning: Reviewers diff --git a/.github/actions/spell-check/dictionary/apis.txt b/.github/actions/spell-check/dictionary/apis.txt index 31381336e89..d50ce266603 100644 --- a/.github/actions/spell-check/dictionary/apis.txt +++ b/.github/actions/spell-check/dictionary/apis.txt @@ -1,3 +1,5 @@ +ACCEPTFILES +ACCESSDENIED bitfield bitfields href @@ -5,6 +7,7 @@ IBox ICustom IMap IObject +IStorage LCID NCHITTEST NCLBUTTONDBLCLK @@ -15,3 +18,4 @@ ocidl rfind roundf SIZENS +tmp diff --git a/.github/actions/spell-check/dictionary/names.txt b/.github/actions/spell-check/dictionary/names.txt index 737c6932e24..6d47c4e98e9 100644 --- a/.github/actions/spell-check/dictionary/names.txt +++ b/.github/actions/spell-check/dictionary/names.txt @@ -3,6 +3,7 @@ austdi Ballmer bhoj Bhojwani +carlos dhowett Diviness dsafa @@ -53,6 +54,8 @@ Wirt Wojciech zadjii Zamor +Zamora +zamora Zoey zorio Zverovich diff --git a/.github/actions/spell-check/excludes.txt b/.github/actions/spell-check/excludes.txt index c470442f2f2..97eb58e3ff7 100644 --- a/.github/actions/spell-check/excludes.txt +++ b/.github/actions/spell-check/excludes.txt @@ -51,6 +51,7 @@ SUMS$ \.xpm$ \.yml$ \.zip$ +^consolegit2gitfilters\.json$ ^dep/ ^oss/ ^doc/reference/UTF8-torture-test\.txt$ diff --git a/.github/actions/spell-check/expect/README.md b/.github/actions/spell-check/expect/README.md new file mode 100644 index 00000000000..d94245a184f --- /dev/null +++ b/.github/actions/spell-check/expect/README.md @@ -0,0 +1,13 @@ +The contents of each `.txt` file in this directory are merged together. + +* [alphabet](alphabet.txt) is a sample for alphabet related items +* [web](web.txt) is a sample for web/html related items +* [expect](expect.txt) is the main list of expected items -- there is nothing +particularly special about the file name (beyond the extension which is +important). + +These terms are things which temporarily exist in the project, but which +aren't necessarily words. + +If something is a word that could come and go, it probably belongs in a +[dictionary](../dictionary/README.md). diff --git a/.github/actions/spell-check/whitelist/alphabet.txt b/.github/actions/spell-check/expect/alphabet.txt similarity index 98% rename from .github/actions/spell-check/whitelist/alphabet.txt rename to .github/actions/spell-check/expect/alphabet.txt index c23b6c91d2b..3644d8e5922 100644 --- a/.github/actions/spell-check/whitelist/alphabet.txt +++ b/.github/actions/spell-check/expect/alphabet.txt @@ -1,4 +1,3 @@ -abcd abcde abcdef ABCDEFG @@ -8,6 +7,7 @@ abcdefghijk abcdefghijklmnop ABCDEFGHIJKLMNOPQRST abcdefghijklmnopqrstuvwxyz +ABE BBBBBBBBBBBBBBDDDD QQQQQQQQQQABCDEFGHIJ QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQ diff --git a/.github/actions/spell-check/whitelist/whitelist.txt b/.github/actions/spell-check/expect/expect.txt similarity index 98% rename from .github/actions/spell-check/whitelist/whitelist.txt rename to .github/actions/spell-check/expect/expect.txt index ed3ec9337f8..84ddc0aba21 100644 --- a/.github/actions/spell-check/whitelist/whitelist.txt +++ b/.github/actions/spell-check/expect/expect.txt @@ -2,18 +2,11 @@ AAAAAABBBBBBCCC AAAAABBBBBBBCCC AAAAABCCCCCCCCC AAAAADCCCCCCCCC -AAD ABANDONFONT ABCDEFGHIJKLMNO ABCG -abe -abec abf abi -acb -accd -ACCEPTFILES -ACCESSDENIED acec acf acidev @@ -29,10 +22,7 @@ ADDREF addressof ADDSTRING ADDTOOL -aeed AEnd -afae -afceeeaa AFew AFill AFX @@ -131,7 +121,6 @@ awch azuredevopspodcast azurewebsites azzle -baac backend backgrounded Backgrounder @@ -142,23 +131,15 @@ Batang baz Bazz BBBBCCCCC -bbc -bbd BBDM -bbe bbwe bc -bca -bcb -bcc bcount bcrypt bcx bcz -bda BEFOREPARENT beginthread -bfb bgcolor bgfx bgidx @@ -172,7 +153,6 @@ binplace binplaced bitcoin bitcrazed -bitfield bitflag bitmask BITOPERATION @@ -215,7 +195,6 @@ BValue byref bytearray bytebuffer -caa Cac callee cang @@ -224,11 +203,8 @@ CARETBLINKINGENABLED CARRIAGERETURN cascadia catid -carlos -zamora cazamor CBash -cbb cbegin cbiex CBN @@ -249,12 +225,9 @@ CConversion CCRT cctype CDATA -CDBA cdd -CDE cdecl CDeclaration -cebb CEdit CELLSIZE cend @@ -502,14 +475,10 @@ dai DATABLOCK DATAVIEW DATAW -dba DBatch -dbb dbcs DBCSCHAR DBCSFONT -dbd -DBDCF dbg DBGALL DBGCHARS @@ -520,13 +489,11 @@ dblclk DBlob dbproj DBUILD -dcf DColor DCOLORVALUE dcommon DCompile dcompiler -ddb dde DDESHARE DDevice @@ -616,7 +583,6 @@ devicefamily devops Dext df -dfa DFactory dh dialogbox @@ -684,14 +650,9 @@ dxgidwm dxinterop dxttbmp eachother -EAEC eaf EASTEUROPE eb -eba -ebce -EBFB -ECFB ECH echokey ecount @@ -701,8 +662,6 @@ EDITTEXT EDITUPDATE edputil edu -eeb -eee Efast EHsc EJO @@ -712,8 +671,6 @@ Elems elif elseif emacs -Emoji -Emojis emptybox enabledelayedexpansion endian @@ -771,26 +728,17 @@ failfast FAILIFTHERE fallthrough FARPROC -fba -fbb -fbd -fbdc -FBE fcb -fcc fcharset fclose fcntl -fd -fdb fdc -fdd +FDD fde fdopen fdw fea fesb -ffc FFDE FFF FFrom @@ -936,7 +884,6 @@ Gfun gfx gh github -githubusercontent gitlab gle globals @@ -1029,7 +976,6 @@ hpp HPR HPROPSHEETPAGE HREDRAW -HREF hresult HRSRC hscroll @@ -1397,7 +1343,6 @@ memallocator memcmp memcopy memcpy -memcpying memmove memset MENUCHAR @@ -1671,7 +1616,6 @@ Outof OUTOFCONTEXT OUTOFMEMORY outout -OUTPATHROOT Outptr Ov OVERLAPPEDWINDOW @@ -2231,7 +2175,6 @@ stgm stl stoi stol -storageitems storelogo stoul stoutapot @@ -2337,7 +2280,6 @@ TEXCOORD texel textattribute TEXTATTRIBUTEID -textblock Textbox textboxes textbuffer @@ -2365,7 +2307,6 @@ TLEN Tlg Tlgdata TMAE -tmp TMPF TMult tmultiple @@ -2398,7 +2339,6 @@ TRACKCOMPOSITION trackpad transcoder transitioning -trc Trd TREX triaged @@ -2519,7 +2459,6 @@ USESHOWWINDOW USESIZE USESTDHANDLES ushort -usr USRDLL utf utils @@ -2561,7 +2500,6 @@ vkey VKKEYSCAN VMs VPA -vpack VPATH VPR VPrintf @@ -2742,7 +2680,6 @@ WRITECONSOLEINPUT WRITECONSOLEOUTPUT WRITECONSOLEOUTPUTSTRING wrl -wrn wrp WRunoff WScript diff --git a/.github/actions/spell-check/whitelist/web.txt b/.github/actions/spell-check/expect/web.txt similarity index 100% rename from .github/actions/spell-check/whitelist/web.txt rename to .github/actions/spell-check/expect/web.txt diff --git a/.github/actions/spell-check/patterns/patterns.txt b/.github/actions/spell-check/patterns/patterns.txt index ca0177c4666..765eef4c23c 100644 --- a/.github/actions/spell-check/patterns/patterns.txt +++ b/.github/actions/spell-check/patterns/patterns.txt @@ -2,8 +2,10 @@ https://(?:(?:[-a-zA-Z0-9?&=]*\.|)microsoft\.com)/[-a-zA-Z0-9?&=_\/.]* https://aka\.ms/[-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}(?:[}"]|